;;;; Purpose: Multiprocessing functions
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: June 2003
;;;; Purpose: Multiprocessing functions
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: June 2003
#+allegro (mp:process-run-function name func)
#+cmu (mp:make-process func :name name)
#+lispworks (mp:process-run-function name nil func)
#+allegro (mp:process-run-function name func)
#+cmu (mp:make-process func :name name)
#+lispworks (mp:process-run-function name nil func)
- #+sb-thread (sb-thread:make-thread func)
- #-(or allegro cmu lispworks sb-thread) (funcall func)
+ #+sb-thread (sb-thread:make-thread func :name name)
+ #+ccl (ccl:process-run-function name func)
+ #-(or allegro cmu lispworks sb-thread ccl) (funcall func)
#+allegro (mp:process-kill process)
#+sb-thread (sb-thread:destroy-thread process)
#+lispworks (mp:process-kill process)
#+allegro (mp:process-kill process)
#+sb-thread (sb-thread:destroy-thread process)
#+lispworks (mp:process-kill process)
#+cmu (mp:make-lock name)
#+lispworks (mp:make-lock :name name)
#+sb-thread (sb-thread:make-mutex :name name)
#+cmu (mp:make-lock name)
#+lispworks (mp:make-lock :name name)
#+sb-thread (sb-thread:make-mutex :name name)
#+cmu
`(mp:with-lock-held (,lock) ,@body)
#+lispworks
`(mp:with-lock (,lock) ,@body)
#+sb-thread
`(sb-thread:with-recursive-lock (,lock) ,@body)
#+cmu
`(mp:with-lock-held (,lock) ,@body)
#+lispworks
`(mp:with-lock (,lock) ,@body)
#+sb-thread
`(sb-thread:with-recursive-lock (,lock) ,@body)
`(mp:with-timeout (,seconds) ,@body)
#+sb-thread
`(sb-ext:with-timeout ,seconds ,@body)
`(mp:with-timeout (,seconds) ,@body)
#+sb-thread
`(sb-ext:with-timeout ,seconds ,@body)
- #-(or allegro cmu sb-thread)
+ #+ccl
+ `(ccl:process-wait-with-timeout "waiting"
+ (* ,seconds ccl:*ticks-per-second*)
+ #'(lambda ()
+ ,@body) nil)
+ #-(or allegro cmu sb-thread ccl)