Switching to unfair locking
This commit is contained in:
parent
3880506620
commit
2a88dd67a9
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ class BoundedBlockingQueue[E <: AnyRef](val maxCapacity: Int, private val backin
|
|||
require(maxCapacity > 0)
|
||||
}
|
||||
|
||||
protected val lock = new ReentrantLock(true)
|
||||
protected val lock = new ReentrantLock(false)
|
||||
|
||||
private val notEmpty = lock.newCondition()
|
||||
private val notFull = lock.newCondition()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue