| |
|
| java.lang.Object java.lang.Thread oscript.util.WorkerThread
WorkerThread | public class WorkerThread extends Thread (Code) | | A common minimum priority worker thread for all background tasks.
author: Rob Clark (rob@ti.com) version: 1 |
Method Summary | |
public static synchronized void | addRunnable(Runnable r, int frequency) Add a runnable to be called periodically from the background worker thread.
Parameters: r - the runnable Parameters: freq - how frequently (in ms) should the worker attempt to runthe runnable. | public static synchronized void | invokeLater(Runnable r) Call the specified runnable from the worker thread as soon as possible. | public static synchronized void | removeRunnable(Runnable r) Remove a runnable. | public void | run() |
addRunnable | public static synchronized void addRunnable(Runnable r, int frequency)(Code) | | Add a runnable to be called periodically from the background worker thread.
Parameters: r - the runnable Parameters: freq - how frequently (in ms) should the worker attempt to runthe runnable. Of course higher priority tasks can cause the runnableto be run less frequently. (note: not implemented yet... everythingis currently hard coded to 500ms) |
invokeLater | public static synchronized void invokeLater(Runnable r)(Code) | | Call the specified runnable from the worker thread as soon as possible.
|
removeRunnable | public static synchronized void removeRunnable(Runnable r)(Code) | | Remove a runnable.
|
|
|
|