From: <me...@re...> - 2007-03-22 21:07:11
|
On Wednesday 21 March 2007 14:50, Nikodemus Siivola wrote: > G=E1bor Melis wrote: > > Yeah, the default was NIL until the last moment when I decided that > > it should really be T and apparently forgot to run the tests again. > > Can we mark the interface as experimental in the docstring for 1.0.4? > This looks much better: (defun join-thread (thread &key (default-value-list nil default-value-list-= p)) #!+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-VALUE-LIST 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)))) (default-value-list-p (values-list default-value-list)) (t (error 'join-thread-error :thread thread))))) Still we might not need the multiple return values that badly after all: (join-thread xxx :default-value-list '(t)) is so cumbersome compared to: (join-thread xxx :default t) G |