Method: Bundler::ConnectionPool::TimedStack#push

Defined in:
lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb

#push(obj, options = {}) ⇒ Object Also known as: <<

Returns obj to the stack. options is ignored in TimedStack but may be used by subclasses that extend TimedStack.



38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb', line 38

def push(obj, options = {})
  @mutex.synchronize do
    if @shutdown_block
      @created -= 1 unless @created == 0
      @shutdown_block.call(obj)
    else
      store_connection obj, options
    end

    @resource.broadcast
  end
end