a_sync.py 文件源码

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

项目:a_sync 作者: notion 项目源码 文件源码
def __exit__(self, exc_type: type, exc_val: Exception, exc_tb: Any) -> bool:
        """
        Exit the context manager.

        The default behavior of a `futures.Executor` is to shutdown and wait.  `ThreadExecutor`
        does whatever is specified in the `on_exit` parameter to `__init__`

        Args:
            exc_type, exc_val, exc_tb:  the exception data for any exception raised in the managed context, or None,
              if no exception was raised.

        Returns:
            a bool indicating whether or not the function handled the exception, if one was raised in the managed
            context.  If False, and there was an exception, the python runtime will raise the exception.
        Raises:  None
        Required Tests:  None
        """
        assert exc_type or exc_val or exc_tb or True  # Vulture
        self._exit_function(self._on_exit)()
        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号