[cells-gtk-cvs] CVS update: root/cells-gtk/compat.lisp

Peter Denno pdenno at common-lisp.net
Sat Feb 12 19:09:24 UTC 2005


Update of /project/cells-gtk/cvsroot/root/cells-gtk
In directory common-lisp.net:/tmp/cvs-serv1581/cells-gtk

Modified Files:
	compat.lisp 
Log Message:
in lispworks, when process-wait-with-timeout is supplied with a predicate, event if #'(lambda () t) it has much different characteristics, than when it isn't supplied with one at all. So why isn't this just mp:sleep? I don't know. 
Date: Sat Feb 12 20:09:24 2005
Author: pdenno

Index: root/cells-gtk/compat.lisp
diff -u root/cells-gtk/compat.lisp:1.1 root/cells-gtk/compat.lisp:1.2
--- root/cells-gtk/compat.lisp:1.1	Sat Feb 12 15:38:37 2005
+++ root/cells-gtk/compat.lisp	Sat Feb 12 20:09:24 2005
@@ -28,13 +28,16 @@
   #+CMU (mp:process-wait whostate (lambda () (apply predicate args)))
   #+LispWorks (apply #'mp:process-wait whostate predicate args))
 
-;;; From clocc port
-(defun process-wait-with-timeout (timeout whostate predicate &rest args)
-  "Sleep until PREDICATE becomes true, or for TIMEOUT seconds,
-whichever comes first."
+;;; From clocc port, but with additions and deletions
+(defun process-wait-with-timeout (timeout whostate 
+                                  &optional (predicate #'(lambda () t) pred-supplied-p)
+                                  &rest args)
+  "Sleep until PREDICATE becomes true, or for TIMEOUT seconds, whichever comes first."
   #+Allegro
   (apply #'mp:process-wait-with-timeout whostate timeout predicate args)
   #+CMU (mp:process-wait-with-timeout
          whostate timeout (lambda () (apply predicate args)))
   #+LispWorks
-  (apply #'mp:process-wait-with-timeout whostate timeout predicate args))
+  (if pred-supplied-p
+    (apply #'mp:process-wait-with-timeout whostate timeout predicate args)
+    (mp:process-wait-with-timeout whostate timeout)))




More information about the Cells-gtk-cvs mailing list