sleep.bridges
public class Semaphore extends Object
Constructor Summary | |
---|---|
Semaphore(long initialCount) initializes this semaphore with the specified initial count |
Method Summary | |
---|---|
long | getCount() returns the current count data associated with this semaphore. note that this value is volatile |
void | P() aquires this semaphore by attempting to decrement the count. blocks if the count is not > 0 (prior to decrement). |
String | toString() returns a nice string representation of this semaphore |
void | V() increments this semaphore |