Class: AdvancedConnection::ActiveRecordExt::ConnectionPool::Queues::YoungAgeBiased

Inherits:
AgeSorted
  • Object
show all
Defined in:
lib/advanced_connection/active_record_ext/connection_pool/queues.rb

Instance Method Summary collapse

Methods inherited from AgeSorted

#poll

Methods inherited from Default

#size

Instance Method Details

#removeObject



49
50
51
52
53
# File 'lib/advanced_connection/active_record_ext/connection_pool/queues.rb', line 49

def remove
  # Think of this like a stack, sorted youngest to oldest, bottom to top. To to
  # aquire the youngest entry, we shift it off the bottom (i.e., the first element)
  @queue.shift
end