[usocket-cvs] r425 - in usocket/branches/experimental-udp: . backend

ctian at common-lisp.net ctian at common-lisp.net
Thu Oct 2 22:48:46 UTC 2008


Author: ctian
Date: Thu Oct  2 18:48:46 2008
New Revision: 425

Added:
   usocket/branches/experimental-udp/
      - copied from r424, usocket/trunk/
Modified:
   usocket/branches/experimental-udp/backend/lispworks.lisp
Log:
New branch: experimental UDP support

Modified: usocket/branches/experimental-udp/backend/lispworks.lisp
==============================================================================
--- usocket/trunk/backend/lispworks.lisp	(original)
+++ usocket/branches/experimental-udp/backend/lispworks.lisp	Thu Oct  2 18:48:46 2008
@@ -216,15 +216,20 @@
       ;; Can we have a sane -pref. complete [UDP!?]- API next time, please?
       (dolist (x (wait-list-waiters wait-list))
         (mp:notice-fd (os-socket-handle x)))
-      (mp:process-wait-with-timeout "Waiting for a socket to become active"
-                                    (truncate timeout)
-                                    #'(lambda (socks)
-                                        (let (rv)
-                                          (dolist (x socks rv)
-                                            (when (usocket-listen x)
-                                              (setf (state x) :READ
-                                                    rv t)))))
-                                    (wait-list-waiters wait-list))
+      (labels ((wait-function (socks)
+		 (let (rv)
+		   (dolist (x socks rv)
+		     (when (usocket-listen x)
+		       (setf (state x) :READ
+			     rv t))))))
+	(if timeout
+	    (mp:process-wait-with-timeout "Waiting for a socket to become active"
+					(truncate timeout)
+					#'wait-function
+					(wait-list-waiters wait-list))
+	    (mp:process-wait "Waiting for a socket to become active"
+			     #'wait-function
+			     (wait-list-waiters wait-list))))
       (dolist (x (wait-list-waiters wait-list))
         (mp:unnotice-fd (os-socket-handle x)))
       wait-list)))



More information about the usocket-cvs mailing list