mailboxes behaviour (cc: andyjpb) added by sjw on Mon Aug 27 17:09:21 2012

(use mailbox srfi-18)

(let* ((my-box (make-mailbox))
       (proc   (lambda () (pp (thread-name (current-thread))) (pp (mailbox-receive! my-box))))
       (thread (thread-start! (make-thread proc))))

    (mailbox-send! my-box "goodbye!")  
    (if (> (mailbox-count my-box) 0) (proc)))