def test_yield_outside_with(self):
# This pattern avoids the problem in the previous test.
cb = yield gen.Callback('k1')
with StackContext(functools.partial(self.context, 'c1')):
self.io_loop.add_callback(cb)
yield gen.Wait('k1')
stack_context_test.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录