Changeset 500 for Tests


Ignore:
Timestamp:
03/27/12 13:00:10 (10 years ago)
Author:
BegemoT
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Tests/JAVA/test/src/main/java/test/threads/queue/unstressed/impl/ABQConditionFreeQueue.java

    r499 r500  
    1414public class ABQConditionFreeQueue<T> implements IQueue<T> { 
    1515 
    16     private static final int FREE = 0; 
    17     private static final int OWNED = 1; 
     16    private static final boolean USE_YIELD_BACKOFF = true; 
     17 
    1818 
    1919    private final T[] items; 
     
    7777 
    7878    private void backoff( final int turn ) throws InterruptedException { 
    79         Thread.yield(); 
     79        if ( USE_YIELD_BACKOFF ) { 
     80            Thread.yield(); 
     81        } 
    8082 
    8183        /*if ( turn % 10 == 9 ) { 
     
    128130        @Override 
    129131        public String toString() { 
    130             return "ABQConditionFreeFactory"; 
     132            return "ABQConditionFreeFactory[" + ( USE_YIELD_BACKOFF ? "yield-backoff" : "no-backoff" ) + "]"; 
    131133        } 
    132134    }; 
Note: See TracChangeset for help on using the changeset viewer.