Méthode | Description | |
---|---|---|
AddOne ( ) : void |
V the semaphore (add 1 unit to it).
|
|
P ( ) : void |
P the semaphore (take out 1 unit from it).
|
|
Reset ( int count ) : void |
Resets the semaphore to the specified count. Should be used cautiously.
|
|
Semaphore ( ) : System |
Initialize the semaphore as a binary semaphore.
|
|
Semaphore ( int count ) : System |
Initialize the semaphore as a counting semaphore.
|
|
V ( ) : void |
V the semaphore (add 1 unit to it).
|
|
WaitOne ( ) : void |
P the semaphore (take out 1 unit from it).
|
public Semaphore ( int count ) : System | ||
count | int | Initial number of threads that can take out units from this semaphore. |
Résultat | System |