class RealThread extends Object
Runs callbacks on a real managed worker thread. This is distinct from the cooperative script pseudo-threads.
This class is exported by the KS module.
Worker := RealThread.Call(Callback , Params*)
Starts Callback on a worker and returns its RealThread object.
Continuation := Worker.ContinueWith(Callback , Params*)
Starts Callback on a new worker after this worker finishes and returns the continuation's RealThread object.
Worker.Post(Callback , Params*)
Queues a callback on the worker and returns immediately.
Result := Worker.Send(Callback , Params*)
Runs a callback synchronously on the worker and returns its result.
Result := Worker.Wait(Timeout)
Waits for the worker to complete and returns its result. Timeout is milliseconds; omit it to wait indefinitely.
IdThe managed ID of the backing worker thread.
IsAliveTrue while the worker can accept work.
State shared between real threads requires synchronization. Use LockRun or another appropriate design when callbacks mutate shared objects.