code: def halt(self):
          
          if self._callback:
              self._running.clear()
              self._ioloop.remove_handler(self.serial.fd)
  
              if self._frame_future is not None:
                  self._frame_future.set_result(None)
                  self._frame_future = None
docs: halt: None -> None
  
          Stop the event, and remove the FD from the loop handler