Package com.biglybt.pifimpl.local.utils
Class SemaphoreImpl
- java.lang.Object
-
- com.biglybt.pifimpl.local.utils.SemaphoreImpl
-
-
Field Summary
Fields Modifier and Type Field Description private static long
next_sem_id
private AESemaphore
sem
-
Constructor Summary
Constructors Modifier Constructor Description protected
SemaphoreImpl(PluginInterface pi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
release()
void
releaseAllWaiters()
void
reserve()
boolean
reserve(long timeout_millis)
reserve a semaphore subject to timeoutboolean
reserveIfAvailable()
-
-
-
Field Detail
-
next_sem_id
private static long next_sem_id
-
sem
private AESemaphore sem
-
-
Constructor Detail
-
SemaphoreImpl
protected SemaphoreImpl(PluginInterface pi)
-
-
Method Detail
-
reserveIfAvailable
public boolean reserveIfAvailable()
- Specified by:
reserveIfAvailable
in interfaceSemaphore
-
reserve
public boolean reserve(long timeout_millis)
Description copied from interface:Semaphore
reserve a semaphore subject to timeout
-
releaseAllWaiters
public void releaseAllWaiters()
- Specified by:
releaseAllWaiters
in interfaceSemaphore
-
-