Method: Puma::DSL#force_shutdown_after

Defined in:
lib/puma/dsl.rb

#force_shutdown_after(val = :forever) ⇒ Object

How long to wait for threads to stop when shutting them down. Specifying :immediately will cause Puma to kill the threads immediately. Otherwise the value is the number of seconds to wait.

Puma always waits a few seconds after killing a thread for it to try to finish up it’s work, even in :immediately mode.

The default is :forever.



418
419
420
421
422
423
424
425
426
427
428
429
# File 'lib/puma/dsl.rb', line 418

def force_shutdown_after(val=:forever)
  i = case val
      when :forever
        -1
      when :immediately
        0
      else
        Float(val)
      end

  @options[:force_shutdown_after] = i
end