|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jsyn.SharedSleeper
public class SharedSleeper
Allow multiple threads to sleep on a single resource such as a non-real-time software synthesizer.
Constructor Summary | |
---|---|
SharedSleeper()
|
Method Summary | |
---|---|
void |
addThread()
Add current thread to list of Threads that share this sleeper. |
void |
addThread(java.lang.Thread thread)
Add thread to list of Threads that share this sleeper. |
int |
bumpIndex()
Overridden by clients to perform work. |
int |
getIndex()
|
void |
removeThread()
|
void |
setIndex(int index)
|
int |
sleepUntilIndex(int desiredIndex)
Sleep until the given index is reached. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SharedSleeper()
Method Detail |
---|
public void addThread(java.lang.Thread thread)
public void addThread()
public void removeThread()
public void setIndex(int index)
public int getIndex()
public int bumpIndex()
public int sleepUntilIndex(int desiredIndex) throws java.lang.InterruptedException
java.lang.InterruptedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |