Inheritance diagram for Semaphore::FairSync:
Public Member Functions | |
this (int permits) | |
Protected Member Functions | |
int | tryAcquireShared (int acquires) |
Private Member Functions | |
this () | |
int | getPermits () |
int | nonfairTryAcquireShared (int acquires) |
final bool | tryReleaseShared (int releases) |
void | reducePermits (int reductions) |
int | drainPermits () |
Definition at line 206 of file Semaphore.d.
|
Reimplemented from Semaphore::Sync. Definition at line 207 of file Semaphore.d. |
|
Attempts to acquire in shared mode. This method should query if the state of the object permits it to be acquired in the shared mode, and if so to acquire it. This method is always invoked by the thread performing acquire. If this method reports failure, the acquire method may queue the thread, if it is not already queued, until it is signalled by a release from some other thread. The default implementation throws UnsupportedOperationException
Reimplemented from AbstractLock. Definition at line 211 of file Semaphore.d. References AbstractLock::getFirstQueuedThread(). |
|
Creates a new Definition at line 238 of file LockImpl.d. |
|
Definition at line 151 of file Semaphore.d. Referenced by Semaphore::availablePermits(), and Semaphore::toString(). |
|
Definition at line 155 of file Semaphore.d. Referenced by Semaphore::tryAcquire(), and Semaphore::NonfairSync::tryAcquireShared(). |
|
Attempts to set the state to reflect a release in shared mode. This method is always invoked by the thread performing release. The default implementation throws UnsupportedOperationException.
Reimplemented from AbstractLock. Definition at line 165 of file Semaphore.d. |
|
Definition at line 173 of file Semaphore.d. Referenced by Semaphore::reducePermits(). |
|
Definition at line 181 of file Semaphore.d. Referenced by Semaphore::drainPermits(). |