'Actually runs the thread to process events'

def run(self):

    try:
        while (not self.stop.is_set()):
            try:
                type = self.queue.get(True, 1)
                self.callback(type)
                self.queue.task_done()
            except Empty:
                type = None
        self.stop.clear()
    except Exception as e:
        logger.log((((u'Exception    generated    in    thread    ' + self.name) + u':    ') + ex(e)), logger.ERROR)
        logger.log(repr(traceback.format_exc()), logger.DEBUG)
