Function: SB-THREAD:JOIN-THREAD¶
Suspend current thread until THREAD exits. Return the result values of the thread function.
If THREAD does not exit within TIMEOUT seconds and DEFAULT is supplied, return two values: 1) DEFAULT 2) :TIMEOUT. If DEFAULT is not supplied, signal a JOIN-THREAD-ERROR with JOIN-THREAD-PROBLEM equal to :TIMEOUT.
If THREAD does not exit normally (i.e. aborted) and DEFAULT is supplied, return two values: 1) DEFAULT 2) :ABORT. If DEFAULT is not supplied, signal a JOIN-THREAD-ERROR with JOIN-THREAD-PROBLEM equal to :ABORT.
If THREAD is the current thread, signal a JOIN-THREAD-ERROR with JOIN-THREAD-PROBLEM equal to :SELF-JOIN.
Trying to join the main thread causes JOIN-THREAD to block until TIMEOUT occurs or the process exits: when the main thread exits, the entire process exits.
NOTE: Return convention in case of a timeout is experimental and subject to change.
Lambda list¶
(sb-thread:thread &key sb-thread::default sb-thread::timeout)