module Servolux::Threaded

def stop


has stopped.
defines an 'after_stopping' method, it will be called after the thread
called before the thread is stopped. Likewise, if the including class
If the including class defines a 'before_stopping' method, it will be

without taking any action.
Stop the activity thread. If already stopped this method will return
def stop
  return self unless _activity_thread.running?
  logger.debug "Stopping"
  before_stopping if self.respond_to?(:before_stopping)
  @_activity_thread.stop
  self
end