Function: SB-THREAD:ABORT-THREAD¶
Unwinds from and terminates the current thread abnormally, causing JOIN-THREAD on current thread to signal an error unless a default-value is provided.
If current thread is the main thread of the process (see MAIN-THREAD-P), signals an error unless ALLOW-EXIT is true, as terminating the main thread would terminate the entire process. If ALLOW-EXIT is true, aborting the main thread is equivalent to calling SB-EXT:EXIT code 1 and :ABORT NIL.
Invoking the initial ABORT restart established by MAKE-THREAD is equivalent to calling ABORT-THREAD in other than main threads. However, whereas ABORT restart may be rebound, ABORT-THREAD always unwinds the entire thread. (Behaviour of the initial ABORT restart for main thread depends on the :TOPLEVEL argument to SB-EXT:SAVE-LISP-AND-DIE.)
See also: RETURN-FROM-THREAD and SB-EXT:EXIT.
Lambda list¶
(&key sb-thread::allow-exit)