'Continually pulls messages from the _event_queue and sends them to our
handle_event callback. This is done via its own thread so subclasses with a
lengthy handle_event implementation don\'t block further reading from the
socket.'

def _event_loop(self):

    while True:
        try:
            event_message = self._event_queue.get_nowait()
            self._handle_event(event_message)
        except queue.Empty:
            if (not self.is_alive()):
                break
            self._event_notice.wait()
            self._event_notice.clear()
