Method: Concurrent#initialize

Defined in:
lib/concurrent-ruby/concurrent/exchanger.rb,
lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb,
lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb

#initialize(opts = {}) ⇒ Object

Create a new thread pool.

Options Hash (opts):

  • :fallback_policy (Symbol) — default: :discard

    the policy for handling new tasks that are received when the queue size has reached max_queue or the executor has shut down

Raises:

  • (ArgumentError)

    if :fallback_policy is not one of the values specified in FALLBACK_POLICIES

See Also:



# File 'lib/concurrent-ruby/concurrent/exchanger.rb', line 338