MCPcopy
hub / github.com/tornadoweb/tornado / __init__

Method __init__

tornado/gen.py:748–764  ·  view source on GitHub ↗
(
        self,
        ctx_run: Callable,
        gen: "Generator[_Yieldable, Any, _T]",
        result_future: "Future[_T]",
        first_yielded: _Yieldable,
    )

Source from the content-addressed store, hash-verified

746 """
747
748 def __init__(
749 self,
750 ctx_run: Callable,
751 gen: "Generator[_Yieldable, Any, _T]",
752 result_future: "Future[_T]",
753 first_yielded: _Yieldable,
754 ) -> None:
755 self.ctx_run = ctx_run
756 self.gen = gen
757 self.result_future = result_future
758 self.future = _null_future # type: Union[None, Future]
759 self.running = False
760 self.finished = False
761 self.io_loop = IOLoop.current()
762 if self.ctx_run(self.handle_yield, first_yielded):
763 gen = result_future = first_yielded = None # type: ignore
764 self.ctx_run(self.run)
765
766 def run(self) -> None:
767 """Starts or resumes the generator, running until it reaches a

Callers

nothing calls this directly

Calls 1

currentMethod · 0.80

Tested by

no test coverage detected