X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-thread.lisp;h=57747fc659d91427c23f84e155bdaf67524cb4db;hb=78c2361d1d9e680230df412f4d1489725781c6d2;hp=865cac47802931af3d8c6160aeb1c67b3d5f5891;hpb=c8ae3dcc237260a952ac71ef08ed9ddfed1e9e1e;p=sbcl.git diff --git a/src/code/target-thread.lisp b/src/code/target-thread.lisp index 865cac4..57747fc 100644 --- a/src/code/target-thread.lisp +++ b/src/code/target-thread.lisp @@ -694,20 +694,18 @@ around and can be retrieved by JOIN-THREAD." (setf (sb!kernel:fdocumentation 'join-thread-error-thread 'function) "The thread that we failed to join.") -(defun join-thread (thread &key (errorp t) default) +(defun join-thread (thread &key (default nil defaultp)) #!+sb-doc "Suspend current thread until THREAD exits. Returns the result values of the thread function. If the thread does not exit normally, -return DEFAULT or signal JOIN-THREAD-ERROR depending on ERRORP. This -function is experimental and it is likely to be changed in the -future." +return DEFAULT if given or else signal JOIN-THREAD-ERROR." (with-mutex ((thread-result-lock thread)) (cond ((car (thread-result thread)) (values-list (cdr (thread-result thread)))) - (errorp - (error 'join-thread-error :thread thread)) + (defaultp + default) (t - default)))) + (error 'join-thread-error :thread thread))))) (defun destroy-thread (thread) #!+sb-doc