]> gitweb.factorcode.org Git - factor.git/commitdiff
benchmark.sockets: don't hang if an error occurs
authorSlava Pestov <slava@shill.local>
Thu, 24 Sep 2009 01:37:34 +0000 (20:37 -0500)
committerSlava Pestov <slava@shill.local>
Thu, 24 Sep 2009 01:37:34 +0000 (20:37 -0500)
extra/benchmark/sockets/sockets.factor

index d6e4f29b86e2175d5c27705819d3d4743a082955..f103c377b9a0e9cc585cb9d4f85778d7249e551c 100755 (executable)
@@ -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