global

def stop

def stop
  self.running = false
  thread.wakeup if thread.alive?
end  # @private