_sync.py 文件源码

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

项目:trio 作者: python-trio 项目源码 文件源码
def statistics(self):
        """Return an object containing debugging information.

        Currently the following fields are defined:

        * ``locked``: boolean indicating whether the lock is held.
        * ``owner``: the :class:`trio.hazmat.Task` currently holding the lock,
          or None if the lock is not held.
        * ``tasks_waiting``: The number of tasks blocked on this lock's
          :meth:`acquire` method.

        """
        return _LockStatistics(
            locked=self.locked(),
            owner=self._owner,
            tasks_waiting=len(self._lot),
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号