Permalink
Browse files

Updates README.md with usage syntax for pool.fill

  • Loading branch information...
1 parent fad68a8 commit 8a709f00d2c6492897c7636b3c847276200c8569 @righi committed Dec 2, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 README.md
View
@@ -16,6 +16,9 @@ licensed under the Apache 2.0 License.
pool = Innertube::Pool.new(proc { Connection.new },
proc {|c| c.disconnect })
+# Optionally, fill the pool with existing resources
+pool.fill([conn1, conn2, conn3])
+
# Grab a connection from the pool, returns the same value
# as the block
pool.take {|conn| conn.ping } # => true

0 comments on commit 8a709f0

Please sign in to comment.