Called when the thread starts, before the job is executed.
Static methods
staticaddCallbacks(callbacks:ThreadCallbacks):IThreadCallbackHandle
Registers callbacks to be called for every thread, both already-running and future ones.
Returns a handle that can be used to unregister the callbacks.
Unlike callbacks passed to Thread.create, closing the returned handle prevents the
callbacks from being called even for threads that are already running.
staticaddCurrentCallbacks(callbacks:CurrentThreadCallbacks):IThreadCallbackHandle
Registers callbacks to be called for the current thread.
staticcreate(?name:String, job:() ‑> Void, ?callbacks:ThreadCallbacks):Thread
Creates a new thread that will execute the job function, then exit after all events are processed.
You can specify a custom exception handler onAbort or else Thread.onAbort will be called.
staticcurrent():Thread
Returns the current thread.
If you are calling this function from a native thread that is not the main thread and was not created by Thread.create, this will return you
a native thread with a null EvenLoop and isNative set to true. You need to call disposeNative() on such value on thread termination.
Variables
read onlyisNative:Bool
Tells if a thread is a native thread that is not managed by Haxe.
See Thread.current for details.