class Thin::Server
Public Class Methods
add_after_startup_callback(proc=nil, &block)
click to toggle source
this is excepting requests and has written the socket file
# File lib/garbageman/ext/thin.rb, line 60 def self.add_after_startup_callback(proc=nil, &block) @@after_startup_callbacks << (proc || block) end
add_before_startup_callback(proc=nil, &block)
click to toggle source
thin is not yet excepting requests, but EM has started
# File lib/garbageman/ext/thin.rb, line 55 def self.add_before_startup_callback(proc=nil, &block) @@before_startup_callbacks << (proc || block) end
add_close_callback(proc=nil, &block)
click to toggle source
these callbacks are called after all the requests have been processed
# File lib/garbageman/ext/thin.rb, line 65 def self.add_close_callback(proc=nil, &block) @@close_callbacks << (proc || block) end
run_after_startup_callbacks()
click to toggle source
# File lib/garbageman/ext/thin.rb, line 74 def self.run_after_startup_callbacks @@after_startup_callbacks.each { |c| c.call } if @@after_startup_callbacks @@after_startup_callbacks = nil end
run_before_startup_callbacks()
click to toggle source
# File lib/garbageman/ext/thin.rb, line 69 def self.run_before_startup_callbacks @@before_startup_callbacks.each { |c| c.call } if @@before_startup_callbacks @@before_startup_callbacks = nil end
Public Instance Methods
stop_with_callbacks()
click to toggle source
# File lib/garbageman/ext/thin.rb, line 79 def stop_with_callbacks stop_without_callbacks.tap do @@close_callbacks.each { |c| c.call } if @@close_callbacks @@close_callbacks = nil end end
Also aliased as: stop