connection_manager.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:coretools 作者: iotile 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号