Method: Thrift::NonblockingServer::IOManager#shutdown
- Defined in:
- lib/thrift/server/nonblocking_server.rb
#shutdown(timeout = 0) ⇒ Object
128 129 130 131 132 133 134 135 136 137 |
# File 'lib/thrift/server/nonblocking_server.rb', line 128 def shutdown(timeout = 0) @logger.debug "#{self} is shutting down workers" @worker_queue.clear @num_threads.times { @worker_queue.push [:shutdown] } signal [:shutdown, timeout] @shutdown_queue.pop @signal_pipes[0].close @signal_pipes[1].close @logger.debug "#{self} is shutting down, goodbye" end |