lib/zookeeper/connection_pool.rb
def checkout(blocking = true, &block)
      if block
        checkout_checkin_with_block(block)
      else
        return @pool.pop(!blocking)
      end
    rescue ThreadError
      return false
    end
# checkout a connection from the pool - takes a block which will check it
# back in after the block is finished
# @param optional [Boolean] blocking If blocking is set to false then false will be returned
#   if no connection is available
# @yield [connection] The checked out connection
checkout a connection from the pool - takes a block which will check it
back in after the block is finished
checkout a connection from the pool - takes a block which will check it back in after the block is finished
def checkout(blocking = true, &block)
      if block
        checkout_checkin_with_block(block)
      else
        return @pool.pop(!blocking)
      end
    rescue ThreadError
      return false
    end
def checkout ( blocking = true , & block ) if block checkout_checkin_with_block ( block ) else return @pool . pop ( ! blocking ) end rescue ThreadError return false end
checkout a connection from the pool - takes a block which will check it
back in after the block is finished
checkout a connection from the pool - takes a block which will check it back in after the block is finished
blocking
block
optional
blocking If blocking is set to false then false will be returned if no connection is available
blocking If blocking is set to false then false will be returned if no connection is available
]
The checked out connection
The checked out connection