diff --git a/src/code/multi-proc.lisp b/src/code/multi-proc.lisp index 8b2df04ac1d1e5584aba08ab839836a026af93a2..b0ce883a1d172c6eca19c34d6d846ebea0276496 100644 --- a/src/code/multi-proc.lisp +++ b/src/code/multi-proc.lisp @@ -1972,3 +1972,20 @@ ,lock 2 *current-process* nil) #-x86 (when (eq (lock-process ,lock) *current-process*) (setf (lock-process ,lock) nil))))))) + +(defun %make-thread (function name) + (mp:make-process (lambda () + (let ((return-values + (multiple-value-list (funcall function)))) + (setf (getf (mp:process-property-list mp:*current-process*) + 'return-values) + return-values) + (values-list return-values))) + :name name)) + +(defun join-thread (thread) + (mp:process-wait (format nil "Waiting for thread ~A to complete" thread) + (lambda () (not (mp:process-alive-p thread)))) + (let ((return-values + (getf (mp:process-property-list thread) 'return-values))) + (values-list return-values))) diff --git a/src/general-info/release-20e.txt b/src/general-info/release-20e.txt index 5ec6b030636298218666674a15ead4146fa9c782..06c2fc67e4e4f4d571598e091b2790298eed8bea 100644 --- a/src/general-info/release-20e.txt +++ b/src/general-info/release-20e.txt @@ -42,6 +42,7 @@ New in this release: * :I486 and :PENTIUM (Always assume we're running on at least a Pentium.) * Update unicode to support Unicode 6.2. + * Add MP:JOIN-THREAD, as given in ticket #77. * ANSI compliance fixes: * Attempts to modify the standard readtable or the standard pprint @@ -70,6 +71,7 @@ New in this release: * Ticket #74 fixed. * Ticket #76 fixed. * Ticket #79 fixed. + * Ticket #77 fixed. * Other changes: * -8 option for build-all.sh is deprecated since we don't