; (import (chicken condition)) (define (maybe-condition->list exn) (or (and (condition? exn) (condition->list exn)) exn) ) ;from caolan (print) (print "** Test Primordial Waiting **") (import srfi-18 mailbox) (define mbox (make-mailbox)) (define primordial ##sys#primordial-thread #;(current-thread)) (define (tst-thd) (thread-sleep! 1) (thread-signal! primordial 'example) ) (define tst-thd-1 (thread-start! tst-thd)) #; ;; this hangs forever and eats all my cycles (with timeout) (handle-exceptions exn (print "+ wait with timeout NOT OK for primordial thread: " (maybe-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: " (maybe-condition->list exn)) (mailbox-receive! mbox) )