benchmark.sockets: don't hang if an error occurs

db4
Slava Pestov 2009-09-23 20:37:34 -05:00
parent 3104aa3962
commit 2406bdd6f7
1 changed files with 1 additions and 2 deletions

View File

@ -23,7 +23,6 @@ CONSTANT: number-of-requests 1000
] [
number-of-requests
[ read1 write1 flush ] times
counter get count-down
] if
] with-stream
] curry "Client handler" spawn drop server-loop ;
@ -55,7 +54,7 @@ CONSTANT: number-of-requests 1000
: clients ( n -- )
dup pprint " clients: " write [
<promise> port-promise set
dup 2 * <count-down> counter set
dup <count-down> counter set
[ simple-server ] "Simple server" spawn drop
yield yield
[ [ simple-client ] "Simple client" spawn drop ] times