- Timestamp:
- 03/27/12 13:00:10 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Tests/JAVA/test/src/main/java/test/threads/queue/unstressed/impl/ABQConditionFreeQueue.java
r499 r500 14 14 public class ABQConditionFreeQueue<T> implements IQueue<T> { 15 15 16 private static final int FREE = 0;17 private static final int OWNED = 1; 16 private static final boolean USE_YIELD_BACKOFF = true; 17 18 18 19 19 private final T[] items; … … 77 77 78 78 private void backoff( final int turn ) throws InterruptedException { 79 Thread.yield(); 79 if ( USE_YIELD_BACKOFF ) { 80 Thread.yield(); 81 } 80 82 81 83 /*if ( turn % 10 == 9 ) { … … 128 130 @Override 129 131 public String toString() { 130 return "ABQConditionFreeFactory ";132 return "ABQConditionFreeFactory[" + ( USE_YIELD_BACKOFF ? "yield-backoff" : "no-backoff" ) + "]"; 131 133 } 132 134 };
Note: See TracChangeset
for help on using the changeset viewer.