code: def _serial_poller(self):
          
          while True:
              _next = dict(self._poller.poll(POLLING_FREQUENCY_MS))
              if self._halt_read_file.fileno() in _next:
                  log.debug("Poller [{}]: halt".format(hash(self)))
                  self._halt_read_file.read()
                  # Note: this is discarded because we send a set message to halt
                  # the thread--don't currently need to parse it
                  break
  
              elif self._connection.fileno() in _next:
                  # Lid-open interrupt
                  log.debug("Poller [{}]: interrupt".format(hash(self)))
                  res = self._connection.read_until(SERIAL_ACK)
                  self._interrupt_callback(res)
  
              elif self._send_read_file.fileno() in _next:
                  self._send_read_file.read(1)
                  command, callback = self._command_queue.get()
                  log.debug("Poller [{}]: send {}".format(hash(self), command))
                  res = self._send_command(command)
                  callback(res)
              else:
                  # Nothing else to do--update device status
                  log.debug("Poller [{}]: updating temp".format(hash(self)))
                  res = self._send_command(GCODES['GET_PLATE_TEMP'])
                  self._status_callback(res)
          log.info("Exiting TC poller loop [{}]".format(hash(self)))
docs: Priority-sorted list of checks
  
          Highest priority is the 'halt' channel, which is used to kill the
          thread and the serial communication channel and allow everything to be
          cleaned up.
  
          Second is the lid-open interrupt, which should trigger a callback
          (typically to halt the robot).
  
          Third is an enqueued command to send to the Thermocycler.
  
          Fourth (if no other work is available) is to query the Thermocycler for
          its current temp, target temp, and time remaining in its current cycle.