Fixes #967 incorrect bitwise operator value in ConcurrentBag.requite method intended to cause parkNanos() to be called every 256 iterations. Thanks to @ztkmkoo for finding this.

pull/972/merge
Brett Wooldridge 8 years ago
parent ac9f53ee9e
commit f75b0896de

@ -186,7 +186,7 @@ public class ConcurrentBag<T extends IConcurrentBagEntry> implements AutoCloseab
if (bagEntry.getState() != STATE_NOT_IN_USE || handoffQueue.offer(bagEntry)) { if (bagEntry.getState() != STATE_NOT_IN_USE || handoffQueue.offer(bagEntry)) {
return; return;
} }
else if ((i & 0x100) == 0x100) { else if ((i & 0xff) == 0xff) {
parkNanos(MICROSECONDS.toNanos(10)); parkNanos(MICROSECONDS.toNanos(10));
} }
else { else {

Loading…
Cancel
Save