Package io.deephaven.base
Class UnfairSemaphore
java.lang.Object
io.deephaven.base.UnfairSemaphore
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
acquire
(int toAcquire) int
int
int
forceAcquire
(int toAcquire) int
release
(int toRelease) int
releaseNoUnpark
(int toRelease) boolean
tryAcquire
(int toAcquire) int
-
Constructor Details
-
UnfairSemaphore
public UnfairSemaphore(int resources, int spinsUntilPark)
-
-
Method Details
-
acquire
public boolean acquire(int toAcquire) -
acquireAll
public int acquireAll() -
tryAcquireAll
public int tryAcquireAll() -
tryAcquire
public boolean tryAcquire(int toAcquire) -
release
public int release(int toRelease) -
releaseNoUnpark
public int releaseNoUnpark(int toRelease) -
availablePermits
public int availablePermits() -
forceAcquire
public int forceAcquire(int toAcquire)
-