class Puma::ThreadPool

def with_force_shutdown

provided block if the thread is forced to shutdown during execution.
Allows ThreadPool::ForceShutdown to be raised within the
def with_force_shutdown
  t = Thread.current
  @shutdown_mutex.synchronize do
    raise ForceShutdown if @force_shutdown
    t[:with_force_shutdown] = true
  end
  yield
ensure
  t[:with_force_shutdown] = false
end