linb.thread

Constructor

linb.thread ( id, tasks, delay, callback, onStart, onEnd, cycle )
parameters:
id: id of this thread. If id is null, a new id will asigned to this thread.
task: function
{
task, //function
args, //args array for task
target, //this object for task
delay , //ms number
callback //function for callback
}
delay:default delay time;
callback:default calback function;
onStart: on start function
onEnd: on end function
cycle: is the thread circular

Instance Methods

abort ( )
To let thread abort.

getCache ( key )
To get cached string value by specified key.
key: String.

resume ( time )
Causes this thread to continue execution .
time: Integer. Within how many seconds this thread need to be terminated.

setCache ( key, value )
Set cache by key and value.
key: String.
value: String.

start ( time )
Causes this thread to begin execution.
time: Integer. Within how many seconds this thread need to be terminated.

suspend ( )
Causes this thread to pause.