cc.glsn
Class Semaphore

java.lang.Object
  extended by 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.


Constructor Summary
Semaphore()
           
Semaphore(int i)
           
 
Method Summary
 int getCount()
           
 void P()
          request
 void V()
          release
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Semaphore

public Semaphore()

Semaphore

public Semaphore(int i)
Method Detail

getCount

public int getCount()

V

public void V()
release


P

public void P()
request