class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue

def remove

Removes and returns the head of the queue if possible, or +nil+.
def remove
  @queue.pop
end