class Concurrent::RubyThreadPoolExecutor

def ns_shutdown_execution

@!visibility private
def ns_shutdown_execution
  ns_reset_if_forked
  if @pool.empty?
    # nothing to do
    stopped_event.set
  end
  if @queue.empty?
    # no more tasks will be accepted, just stop all workers
    @pool.each(&:stop)
  end
end