
#77: Add JOIN-PROCESS -------------------------+-------------------------------------------------- Reporter: sionescu | Owner: somebody Type: enhancement | Status: new Priority: major | Milestone: Component: Core | Version: 2013-03-a Keywords: | -------------------------+-------------------------------------------------- Comment(by sionescu): I added a workaround to Bordeaux-Threads, but it would be better to have this functionality in CMUCL itself: {{{ (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))) }}} -- Ticket URL: <http://trac.common-lisp.net/cmucl/ticket/77#comment:1> cmucl <http://common-lisp.net/project/cmucl> Cmucl is a high-performance, free Common Lisp implementation.