]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix pool behavior with image save/restart
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 12 Jun 2008 23:54:38 +0000 (18:54 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 12 Jun 2008 23:54:38 +0000 (18:54 -0500)
extra/io/pools/pools.factor

index 033ba3cbfb12e6465d0c56bdbdb02702683b06a5..0e37e41a76414a0c4c98efe4775e46bcf274f315 100644 (file)
@@ -10,7 +10,7 @@ TUPLE: pool connections disposed expired ;
     dup check-disposed
     dup expired>> expired? [
         ALIEN: 31337 >>expired
-        connections>> [ delete-all ] [ dispose-each ] bi
+        connections>> delete-all
     ] [ drop ] if ;
 
 : <pool> ( class -- pool )
@@ -34,6 +34,7 @@ GENERIC: make-connection ( pool -- conn )
     dup check-pool [ make-connection ] keep return-connection ;
 
 : acquire-connection ( pool -- conn )
+    dup check-pool
     [ dup connections>> empty? ] [ dup new-connection ] [ ] while
     connections>> pop ;