Class: Contender::Pool::AbortPolicy

Inherits:
RejectionPolicy show all
Defined in:
lib/contender/pool/rejection_policy.rb

Overview

Rejection policy that simply raises an exception

Instance Method Summary collapse

Instance Method Details

#on_rejection(task, executor) ⇒ undefined

Parameters:

Returns:

  • (undefined)

Raises:



30
31
32
# File 'lib/contender/pool/rejection_policy.rb', line 30

def on_rejection(task, executor)
  raise TaskRejectionError, "Task #{task} rejected by thread pool executor"
end