Next: , Previous: , Up: Threads   [Contents][Index]

5.15.3 Deleting Threads

A thread may be deleted by either returning from the function specified when it was created, or by explicit deletion. Also, the implicit thread created by the call-with-dynamic-root function may be deleted by exiting from the function called in the new context.

Function: thread-delete #!optional thread

Mark thread (or the current thread), as being deleted. It will not be switched to in the future. If the current thread is deleted, control will be passed to the next runnable thread. Deleting the last runnable thread results forces the containing dynamic root to be closed.

Function: thread-deleted-p thread

Returns true if thread has been deleted.