Package org.boxutil.util.concurrent
Class SpinBarrier
java.lang.Object
org.boxutil.util.concurrent.SpinBarrier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected final AtomicIntegerprotected final int -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
_ROUND_MASK
protected static final int _ROUND_MASK- See Also:
-
_ROUND_L_MOVE
protected static final int _ROUND_L_MOVE- See Also:
-
_ARRIVED_MASK
protected static final int _ARRIVED_MASK- See Also:
-
threadNum
protected final int threadNum -
state
-
-
Constructor Details
-
SpinBarrier
public SpinBarrier(int threadNum) - Parameters:
threadNum- fixed thread number, means how many threads sync required, supports up to 1073741823 threads.
-
-
Method Details
-
barrier
public void barrier() -
getRoundBit
public int getRoundBit() -
getArrived
public int getArrived()
-