def _main(): fwait = gen.Future() assert _current_stackcontext() is None f = greenado.gcall(_gthing, fwait) assert _current_stackcontext() is None fwait.set_result(True) assert _current_stackcontext() is None return f
def _main(): fwait = gen.Future() sc = stack_context.StackContext(_mgr) assert _current_stackcontext() is None with sc: assert _current_stackcontext() is sc f = greenado.gcall(_gthing, sc, fwait) assert _current_stackcontext() is sc fwait.set_result(True) assert _current_stackcontext() is sc assert _current_stackcontext() is None return f
def _main(): return greenado.gcall(_inner)
def _main(): with stack_context.StackContext(_mgr): greenado.gyield(greenado.gcall(_fn)) return True