public class LimitingThread
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TAG |
Constructor and Description |
---|
LimitingThread(java.lang.String name,
java.lang.Runnable r)
Construct a limiting thread with a name and a runnable which will be the worker code
that is executed whenever the exec call is made on the limiting thread.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
dispose(boolean join)
Perform disposal of the limiting thread, canceling any future calls to execute.
|
void |
exec()
Called to perform the action as defined in the runnable used during creation.
|
void |
run() |
public static final java.lang.String TAG
public LimitingThread(java.lang.String name, java.lang.Runnable r)
name
- the name of the limiting threadr
- the runnable to be used that contains the logic to be run on the limiting thread.public void exec()
public void dispose(boolean join)
join
- if join is true, try to wait for the execution to finish of the last
call to exec.public void dispose()
public void run()
run
in interface java.lang.Runnable