Thread
A unit of execution in a process.
A unit of execution in a process. Can run methods on s simultaneously. The use of synchronization via Mutex or is advised if working with shared objects.
enum Priority:
- PRIORITY_LOW = 0 —- A thread running with lower priority than normally.
- PRIORITY_HIGH = 2 —- A thread running with higher priority than normally.
- get_id ( ) const
Returns the current ‘s ID, uniquely identifying it among all threads. If the Thread
is not running this returns an empty string.
- bool is_active ( ) const
Starts a new Thread
that runs method
on object instance
with passed as an argument. Even if no userdata is passed, method
must accept one argument and it will be null. The priority
of the Thread
can be changed by passing a value from the Priority enum.
Returns on success, or @GlobalScope.ERR_CANT_CREATE on failure.