class Contender::Pool::ExecutionByCallerPolicy

Rejection policy that executes the task in the calling thread

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 19
def on_rejection(task, executor)
  return if executor.shutdown?
  task.call
end