# | Line 262 | Line 262 | public class PriorityBlockingQueue<E> ex | |
---|---|---|
262 | if (allocationSpinLock == 0 && | |
263 | ALLOCATIONSPINLOCK.compareAndSet(this, 0, 1)) { | |
264 | try { | |
265 | < | int growth = oldCap < 64 ? oldCap + 2 : oldCap >> 1; |
265 | > | int growth = (oldCap < 64) |
266 | > | ? (oldCap + 2) // grow faster if small |
267 | > | : (oldCap >> 1); |
268 | int newCap = ArraysSupport.newLength(oldCap, 1, growth); | |
269 | if (queue == array) | |
270 | newArray = new Object[newCap]; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |