1 USING: concurrency.mailboxes concurrency.count-downs concurrency.conditions
2 vectors sequences threads tools.test math kernel strings namespaces
3 continuations calendar destructors ;
4 IN: concurrency.mailboxes.tests
6 { 1 1 } [ [ integer? ] mailbox-get? ] must-infer-as
11 [ mailbox-get swap push ] in-thread
12 [ mailbox-get swap push ] in-thread
13 [ mailbox-get swap push ] in-thread
22 [ [ integer? ] mailbox-get? swap push ] in-thread
23 [ [ integer? ] mailbox-get? swap push ] in-thread
24 [ [ integer? ] mailbox-get? swap push ] in-thread
30 { V{ 1 "junk" 3 "junk2" } [ 456 ] } [
33 [ [ integer? ] mailbox-get? swap push ] in-thread
34 [ [ integer? ] mailbox-get? swap push ] in-thread
35 [ [ string? ] mailbox-get? swap push ] in-thread
36 [ [ string? ] mailbox-get? swap push ] in-thread
38 "junk" over mailbox-put
39 [ 456 ] over mailbox-put
41 "junk2" over mailbox-put
47 "foo" over mailbox-put
48 "bar" over mailbox-put
53 <mailbox> 1 seconds mailbox-get-timeout
54 ] [ timed-out-error? ] must-fail-with