Method: Concurrent::RubyExecutor#wait_for_termination

Defined in:
lib/concurrent/executor/executor.rb

#wait_for_termination(timeout = nil) ⇒ Boolean

Note:

Does not initiate shutdown or termination. Either shutdown or kill must be called before this method (or on another thread).

Block until executor shutdown is complete or until timeout seconds have passed.

Parameters:

  • timeout (Integer) (defaults to: nil)

    the maximum number of seconds to wait for shutdown to complete

Returns:

  • (Boolean)

    true if shutdown complete or false on timeout



167
168
169
# File 'lib/concurrent/executor/executor.rb', line 167

def wait_for_termination(timeout = nil)
  stopped_event.wait(timeout)
end