Exemple #1
0
    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
Exemple #2
0
    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
Exemple #3
0
 def _main():
     return greenado.gcall(_inner)
Exemple #4
0
 def _main():
     return greenado.gcall(_inner)
Exemple #5
0
 def _main():
     with stack_context.StackContext(_mgr):
         greenado.gyield(greenado.gcall(_fn))
     return True