new accessors
parent
0f3d585dd2
commit
e924ee696a
|
@ -1,7 +1,7 @@
|
||||||
IN: concurrency.locks.tests
|
IN: concurrency.locks.tests
|
||||||
USING: tools.test concurrency.locks concurrency.count-downs
|
USING: tools.test concurrency.locks concurrency.count-downs
|
||||||
concurrency.messaging concurrency.mailboxes locals kernel
|
concurrency.messaging concurrency.mailboxes locals kernel
|
||||||
threads sequences calendar ;
|
threads sequences calendar accessors ;
|
||||||
|
|
||||||
:: lock-test-0 ( -- )
|
:: lock-test-0 ( -- )
|
||||||
[let | v [ V{ } clone ]
|
[let | v [ V{ } clone ]
|
||||||
|
@ -174,7 +174,7 @@ threads sequences calendar ;
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
[ lock-timeout-test ] [
|
[ lock-timeout-test ] [
|
||||||
linked-error-thread thread-name "Lock timeout-er" =
|
linked-error-thread name>> "Lock timeout-er" =
|
||||||
] must-fail-with
|
] must-fail-with
|
||||||
|
|
||||||
:: read/write-test ( -- )
|
:: read/write-test ( -- )
|
||||||
|
|
|
@ -10,8 +10,8 @@ IN: concurrency.messaging
|
||||||
GENERIC: send ( message thread -- )
|
GENERIC: send ( message thread -- )
|
||||||
|
|
||||||
: mailbox-of ( thread -- mailbox )
|
: mailbox-of ( thread -- mailbox )
|
||||||
dup thread-mailbox [ ] [
|
dup mailbox>> [ ] [
|
||||||
<mailbox> dup rot set-thread-mailbox
|
<mailbox> swap >>mailbox
|
||||||
] ?if ;
|
] ?if ;
|
||||||
|
|
||||||
M: thread send ( message thread -- )
|
M: thread send ( message thread -- )
|
||||||
|
|
Loading…
Reference in New Issue