/[slime]/slime/swank-sbcl.lisp
ViewVC logotype

Diff of /slime/swank-sbcl.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.211 by heller, Sat Aug 9 19:57:00 2008 UTC revision 1.212 by heller, Mon Aug 11 07:37:06 2008 UTC
# Line 1300  stack." Line 1300  stack."
1300                (nconc (mailbox.queue mbox) (list message)))                (nconc (mailbox.queue mbox) (list message)))
1301          (sb-thread:condition-broadcast (mailbox.waitqueue mbox)))))          (sb-thread:condition-broadcast (mailbox.waitqueue mbox)))))
1302    
1303    (defimplementation receive ()    (defimplementation receive-if (test &optional timeout)
     (receive-if (constantly t)))  
   
   (defimplementation receive-if (test)  
1304      (let* ((mbox (mailbox (current-thread)))      (let* ((mbox (mailbox (current-thread)))
1305             (mutex (mailbox.mutex mbox)))             (mutex (mailbox.mutex mbox)))
1306          (assert (or (not timeout) (eq timeout t)))
1307        (loop        (loop
1308         (check-slime-interrupts)         (check-slime-interrupts)
1309         (sb-thread:with-mutex (mutex)         (sb-thread:with-mutex (mutex)
# Line 1314  stack." Line 1312  stack."
1312             (when tail             (when tail
1313               (setf (mailbox.queue mbox) (nconc (ldiff q tail) (cdr tail)))               (setf (mailbox.queue mbox) (nconc (ldiff q tail) (cdr tail)))
1314               (return (car tail))))               (return (car tail))))
1315             (when (eq timeout t) (return (values nil t)))
1316           (handler-case (sb-ext:with-timeout 0.2           (handler-case (sb-ext:with-timeout 0.2
1317                           (sb-thread:condition-wait (mailbox.waitqueue mbox)                           (sb-thread:condition-wait (mailbox.waitqueue mbox)
1318                                                     mutex))                                                     mutex))

Legend:
Removed from v.1.211  
changed lines
  Added in v.1.212

  ViewVC Help
Powered by ViewVC 1.1.5