;from caolan (print) (print "** Test Primordial Waiting **") (use srfi-18 mailbox) (define mbox (make-mailbox)) (define primordial (current-thread)) (define t (thread-start! (lambda () (thread-sleep! 1) (thread-signal! primordial 'example)))) ;; (used to - KRL) this hangs forever and eats all my cycles (with timeout) (handle-exceptions exn (print "+ wait with timeout NOT OK for primordial thread: " (condition->list exn)) (mailbox-receive! mbox 4) ) ;; this exits as expected with the 'example exception (no timeout) (handle-exceptions exn (print "+ wait with no timeout OK for primordial thread: " (if (condition? exn) (condition->list exn) exn)) (mailbox-receive! mbox) )