def __init__(self, adapter_id):
"""Constructor.
Args:
adapter_id (int): Since the ConnectionManager responds to callbacks on behalf
of a DeviceAdapter, it needs to know what adapter_id to send with the
callbacks.
"""
super(ConnectionManager, self).__init__()
self.id = adapter_id
self._stop_event = threading.Event()
self._actions = Queue.Queue()
self._connections = {}
self._int_connections = {}
self._data_lock = threading.Lock()
# Our thread should be a daemon so that we don't block exiting the program if we hang
self.daemon = True
self._logger = logging.getLogger(__name__)
self._logger.addHandler(logging.NullHandler())
self._logger.setLevel(logging.INFO)
评论列表
文章目录