com.sun.cldc.util
Class Semaphore
java.lang.Object
com.sun.cldc.util.Semaphore
public class Semaphore
- extends Object
|
Constructor Summary |
Semaphore(int permits)
Creates a Semaphore with the given number of permits. |
|
Method Summary |
void |
acquire()
Acquires a permit from this semaphore, blocking until one is
available. |
void |
release()
Releases a permit, returning it to the semaphore. |
Semaphore
public Semaphore(int permits)
- Creates a Semaphore with the given number of permits.
acquire
public void acquire()
- Acquires a permit from this semaphore, blocking until one is
available.
release
public void release()
- 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.
Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.