equal
deleted
inserted
replaced
154 |
154 |
155 /** Lock held by take, poll, etc */ |
155 /** Lock held by take, poll, etc */ |
156 private final ReentrantLock takeLock = new ReentrantLock(); |
156 private final ReentrantLock takeLock = new ReentrantLock(); |
157 |
157 |
158 /** Wait queue for waiting takes */ |
158 /** Wait queue for waiting takes */ |
|
159 @SuppressWarnings("serial") // Classes implementing Condition may be serializable. |
159 private final Condition notEmpty = takeLock.newCondition(); |
160 private final Condition notEmpty = takeLock.newCondition(); |
160 |
161 |
161 /** Lock held by put, offer, etc */ |
162 /** Lock held by put, offer, etc */ |
162 private final ReentrantLock putLock = new ReentrantLock(); |
163 private final ReentrantLock putLock = new ReentrantLock(); |
163 |
164 |
164 /** Wait queue for waiting puts */ |
165 /** Wait queue for waiting puts */ |
|
166 @SuppressWarnings("serial") // Classes implementing Condition may be serializable. |
165 private final Condition notFull = putLock.newCondition(); |
167 private final Condition notFull = putLock.newCondition(); |
166 |
168 |
167 /** |
169 /** |
168 * Signals a waiting take. Called only from put/offer (which do not |
170 * Signals a waiting take. Called only from put/offer (which do not |
169 * otherwise ordinarily lock takeLock.) |
171 * otherwise ordinarily lock takeLock.) |