[noctool-cvs] CVS source
jprewett
jprewett at common-lisp.net
Mon Nov 10 19:52:36 UTC 2008
Update of /project/noctool/cvsroot/source
In directory cl-net:/tmp/cvs-serv3569
Modified Files:
scheduler.lisp
Log Message:
removed cruft
--- /project/noctool/cvsroot/source/scheduler.lisp 2008/11/10 19:07:10 1.10
+++ /project/noctool/cvsroot/source/scheduler.lisp 2008/11/10 19:51:54 1.11
@@ -155,39 +155,6 @@
(defvar *process-semaphore* (sb-thread:make-semaphore :name "Simultaneous processes" :count *total-processes*))
-
-(defvar *available-processes*
- (loop for i from 1 to *total-processes*
- collect
- (sb-thread:make-mutex)))
-
-(defvar *mini-sleep* 0.05)
-
-;; XXX is this right? XXX
-;; Looks needlessly complex, to me.
-#-(and)
-(defmacro noc-thread (&body body)
- (let ((my-mutex (gensym))
- (first-mutex (gensym))
- (return-val (gensym)))
- `(let ((,return-val NIL)
- (,my-mutex
- (sb-thread:with-mutex (*process-mutex*)
- (loop as ,first-mutex = (car *available-processes*)
- until ,first-mutex
- do
- (format t "+")
- (sleep *mini-sleep*)
- finally
- (progn
- (setf *available-processes* (cdr *available-processes*))
- (return ,first-mutex))))))
- (sb-thread:with-mutex (,my-mutex)
- (setf ,return-val , at body))
- (sb-thread:with-mutex (*process-mutex*)
- (setf *available-processes* (cons ,my-mutex *available-processes*)))
- ,return-val)))
-
(defmacro with-semaphore (semaphore &body body)
`(progn
(sb-thread:wait-on-semaphore ,semaphore)
More information about the noctool-cvs
mailing list