| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected synchronized void | allowSuspend()
tests whether the thread should suspend, and causes to the thread to pause if appropriate. |
| public synchronized void | |
| public synchronized void | |
| public synchronized void | |
| public abstract void | run()
Redeclares java. Overrides java. This method is run by the thread when it executes. |
| protected synchronized boolean | |
| protected synchronized boolean |
| should_stop | back to summary |
|---|---|
| pack-priv boolean should_stop | |
| should_suspend | back to summary |
|---|---|
| pack-priv boolean should_suspend | |
| GentleThread | back to summary |
|---|---|
| public GentleThread() | |
| GentleThread | back to summary |
|---|---|
| public GentleThread(String name) | |
| allowSuspend | back to summary |
|---|---|
| protected synchronized void allowSuspend() throws InterruptedException tests whether the thread should suspend, and causes to the thread to pause if appropriate. Subclasses should call this method periodically in their run method to, um, allow suspension. Threads paused by allowSuspend() will be properly awoken by gentleResume()
| |
| gentleResume | back to summary |
|---|---|
| public synchronized void gentleResume() a safe method for resuming properly implemented GentleThreads | |
| gentleStop | back to summary |
|---|---|
| public synchronized void gentleStop() a safe method for stopping properly implemented GentleThreads | |
| gentleSuspend | back to summary |
|---|---|
| public synchronized void gentleSuspend() a safe method for suspending properly implemented GentleThreads | |
| run | back to summary |
|---|---|
| public abstract void run() Redeclares java. Overrides java. Doc from java. This method is run by the thread when it executes. Subclasses of This method is not intended to be invoked directly. If this thread is a
platform thread created with a | |
| shouldStop | back to summary |
|---|---|
| protected synchronized boolean shouldStop() tests whether the thread should stop. Subclasses should call this method periodically in their run method, and return from run() is the method returns true. | |
| shouldSuspend | back to summary |
|---|---|
| protected synchronized boolean shouldSuspend() tests whether the thread should suspend. Subclasses rarely call this method directly, and should call allowSuspend() periodically instead.
| |