Package com.biglybt.pif.utils
Interface Semaphore
-
- All Known Implementing Classes:
SemaphoreImpl
public interface Semaphore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
release()
void
releaseAllWaiters()
void
reserve()
boolean
reserve(long timeout_millis)
reserve a semaphore subject to timeoutboolean
reserveIfAvailable()
-
-
-
Method Detail
-
reserve
void reserve()
-
reserveIfAvailable
boolean reserveIfAvailable()
-
reserve
boolean reserve(long timeout_millis)
reserve a semaphore subject to timeout- Parameters:
timeout_millis
- time to wait- Returns:
- true -> semaphore reserved, false -> timeout exceeded
-
release
void release()
-
releaseAllWaiters
void releaseAllWaiters()
-
-