Method: Listen.stop
- Defined in:
- lib/listen.rb
.stop ⇒ Object
This is used by the listen binary to handle Ctrl-C
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/listen.rb', line 43 def stop Internals::ThreadPool.stop @listeners ||= [] # TODO: should use a mutex for this @listeners.each do |listener| # call stop to halt the main loop listener.stop end @listeners = nil end |