Method: Workling::Invokers::ThreadedPoller#stop

Defined in:
lib/workling/invokers/threaded_poller.rb

#stopObject

Gracefully stop processing



54
55
56
57
58
59
60
# File 'lib/workling/invokers/threaded_poller.rb', line 54

def stop
  logger.info("stopping threaded poller...")
  sleep 1 until started? # give it a chance to start up before shutting down. 
  logger.info("Giving Listener Threads a chance to shut down. This may take a while... ")
  @workers.list.each { |w| w[:shutdown] = true }
  logger.info("Listener threads were shut down.  ")
end