cc.glsn
Class Semaphore
java.lang.Object
cc.glsn.Semaphore
public class Semaphore
- extends Object
This class impliments a basic semaphore
Access count is set with constructor
Should add timeouts to retrive access from lost/dead
threads.
Not really serializable. That looses all the waiting threads.
|
Method Summary |
int |
getCount()
|
void |
P()
request |
void |
V()
release |
Semaphore
public Semaphore()
Semaphore
public Semaphore(int i)
getCount
public int getCount()
V
public void V()
- release
P
public void P()
- request