This function may be used to pass control away from the current thread if other threads are waiting to run. There is usually no need to call this function since running threads will be preempted after a period of time.
Mark thread (or the current thread) as being suspended. It will not be selected until either it has had this status removed, or milliseconds milliseconds time has passed.
Suspending the current thread will pass control to the next runnable thread in the same dynamic root. If there are no runnable threads, then the interpreter will sleep until the next thread becomes runnable.
Suspends the current thread until either thread has exited, or timeout milliseconds have passed.
If thread exits normally, then the value of the last form it evaluated is returned; otherwise default-value is returned.
It is an error to call
thread-join on a thread that is not
a member of the current dynamic root.
Remove the suspended state from thread thread. It will then be scheduled for execution sometime subsequently, if its dynamic root is active.
Returns true if thread is currently suspended.
Thread preemption may be forbidden at times, to allow atomic operations to take place. Each dynamic root has its own “forbid counter”. Only when this counter is zero may the current thread be preempted.
Increment the forbid count.
Decrement the forbid count.
Evaluate the list of forms forms with thread preemption temporarily disabled.