| java.lang.Object com.sun.cldc.util.Semaphore
Semaphore | public class Semaphore (Code) | | |
Constructor Summary | |
public | Semaphore(int permits) Creates a Semaphore with the given number of permits. |
Method Summary | |
public void | acquire() Acquires a permit from this semaphore, blocking until one is
available. | public void | release() Releases a permit, returning it to the semaphore. |
Semaphore | public Semaphore(int permits)(Code) | | Creates a Semaphore with the given number of permits.
|
acquire | public void acquire()(Code) | | Acquires a permit from this semaphore, blocking until one is
available.
|
release | public void release()(Code) | | Releases a permit, returning it to the semaphore. If any
threads are blocking trying to acquire a permit, then one is
selected and given the permit that was just released. That
thread is re-enabled for thread scheduling purposes.
|
|
|