def channelOpened(channel): assert channel not in _channels _channels.append(channel) for l in _listeners: try: l.onChannelOpen(channel) except Exception as x: protocol.log("Exception in channel listener", x)
def shutdown(self): try: if self.__on_shutdown: self.__on_shutdown() with self.__lock: self.__is_shutdown = True if self.__is_waiting: self.__is_waiting = False self.__lock.notifyAll() self.__thread.join() except Exception as e: protocol.log("Failed to shutdown TCF event dispatch thread", e)
def __error(self, x): protocol.log("Unhandled exception in TCF event dispatch", x)
def __error(self, x): import protocol # as protocol import this module too protocol.log("Unhandled exception in TCF event dispatch", x)