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