thread_pool.py 文件源码

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

项目:TA-SyncKVStore 作者: georgestarcher 项目源码 文件源码
def get(self, timeout=None):
        """
        Return the result when it arrives. If timeout is not None and the
        result does not arrive within timeout seconds then
        multiprocessing.TimeoutError is raised. If the remote call raised an
        exception then that exception will be reraised by get().
        """

        try:
            res = self._q.get(timeout=timeout)
        except Queue.Empty:
            raise multiprocessing.TimeoutError("Timed out")

        if isinstance(res, Exception):
            raise res
        return res
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号