Ignore:
Timestamp:
Mar 24, 2010, 7:31:27 PM (9 years ago)
Author:
rme
Message:

New function call-in-initial-process.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-processes.lisp

    r13101 r13550  
    745745          (t default))))
    746746
    747 
     747(defun call-in-initial-process (f)
     748  (let* ((process *initial-process*)
     749         (return-values nil)
     750         (done (make-semaphore)))
     751    (process-interrupt process
     752                       #'(lambda ()
     753                           (unwind-protect
     754                                (progn
     755                                  (setq return-values
     756                                        (multiple-value-list (funcall f))))
     757                             (signal-semaphore done))))
     758    (wait-on-semaphore done)
     759    (apply #'values return-values)))
     760
Note: See TracChangeset for help on using the changeset viewer.