Remove code meant to handle what is not believed to be a non-existent race condition.

pull/333/head
Brett Wooldridge 10 years ago
parent f5c248c4f4
commit 1e4f078d5d

@ -124,7 +124,6 @@ public class ConcurrentBag<T extends IConcurrentBagEntry> implements AutoCloseab
final long startScan = System.nanoTime(); final long startScan = System.nanoTime();
final long originTimeout = timeout; final long originTimeout = timeout;
long startSeq; long startSeq;
try {
do { do {
do { do {
startSeq = synchronizer.currentSequence(); startSeq = synchronizer.currentSequence();
@ -141,10 +140,6 @@ public class ConcurrentBag<T extends IConcurrentBagEntry> implements AutoCloseab
timeout = originTimeout - (System.nanoTime() - startScan); timeout = originTimeout - (System.nanoTime() - startScan);
} while (timeout > 1000L && synchronizer.waitUntilSequenceExceeded(startSeq, timeout)); } while (timeout > 1000L && synchronizer.waitUntilSequenceExceeded(startSeq, timeout));
}
finally {
synchronizer.signal();
}
return null; return null;
} }

Loading…
Cancel
Save