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