Starts the thread

def run(self):
        """ Starts the thread """

        task = None
        monitor_task = MonitorTask(
            notification_endpoint=self._handle_message)

        while True:
            if self._terminate:
                self._logger.info("scsgate.Reactor exiting")
                self._connection.close()
                break
            try:
                task = self._request_queue.get_nowait()
                self._logger.debug("scsgate.Reactor: got task {}".format(task))
            except queue.Empty:
                task = monitor_task

            try:
                task.execute(connection=self._connection)
            except ExecutionError as err:
                self._logger.error(err)