Method: Contender::Pool::PoolExecutor#shutdown!

Defined in:
lib/contender/pool/pool_executor.rb

#shutdown!Array

Returns:

API:

  • public



115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/contender/pool/pool_executor.rb', line 115

def shutdown!
  tasks = Array.new

  synchronize do
    advance_state_to STOP
    interrupt_workers

    @queue.drain_to tasks
  end

  try_terminate
  tasks
end