org.xwt.util
Class Semaphore

java.lang.Object
  extended byorg.xwt.util.Semaphore

public class Semaphore
extends java.lang.Object

Simple implementation of a blocking, counting semaphore.


Constructor Summary
Semaphore()
           
 
Method Summary
 void block()
          Decrement the counter, blocking if zero.
 void release()
          Incremenet the counter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Semaphore

public Semaphore()
Method Detail

block

public void block()
Decrement the counter, blocking if zero.


release

public void release()
Incremenet the counter.