Revert "added send-synchronous-timeout word and tests"

This reverts commit 488c3bcaa5.
db4
Doug Coleman 2009-08-30 14:53:50 -05:00
parent 97b6509cfe
commit 2e40f83393
2 changed files with 1 additions and 23 deletions

View File

@ -3,7 +3,7 @@
USING: kernel threads vectors arrays sequences namespaces make
tools.test continuations deques strings math words match
quotations concurrency.messaging concurrency.mailboxes
concurrency.count-downs concurrency.conditions accessors calendar ;
concurrency.count-downs accessors ;
IN: concurrency.messaging.tests
[ ] [ my-mailbox data>> clear-deque ] unit-test
@ -15,19 +15,6 @@ IN: concurrency.messaging.tests
"sent" swap send-synchronous
] unit-test
[ "received" ] [
[
receive "received" swap reply-synchronous
] "Synchronous test" spawn
[ 100 milliseconds "sent" ] dip send-synchronous-timeout
] unit-test
[ [ 100 milliseconds sleep
receive "received" swap reply-synchronous ] "Synchronous test" spawn
[ 50 milliseconds "sent" ] dip send-synchronous-timeout
] [ wait-timeout? ] must-fail-with
[ 1 3 2 ] [
1 self send
2 self send

View File

@ -61,15 +61,6 @@ M: cannot-send-synchronous-to-self summary
data>>
] if ;
: send-synchronous-timeout ( timeout message thread -- reply )
dup self eq? [
cannot-send-synchronous-to-self
] [
[ <synchronous> dup ] dip send
'[ _ synchronous-reply? ] receive-if-timeout
data>>
] if ;
: reply-synchronous ( message synchronous -- )
[ <reply> ] keep sender>> send ;