class Contender::Pool::DiscardOldestPolicy
Rejection policy that discards the first task in the queue and then enqueues the task
Public Instance Methods
on_rejection(task, executor)
click to toggle source
@param [Object] task @param [PoolExecutor] executor @return [undefined]
# File lib/contender/pool/rejection_policy.rb, line 53 def on_rejection(task, executor) return if executor.shutdown? executor.queue.poll executor.execute task end