MCPcopy Create free account
hub / github.com/EasyIME/PIME / run

Method run

python/python3/tornado/ioloop.py:489–508  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

487 future_cell = [None] # type: List[Optional[Future]]
488
489 def run() -> None:
490 try:
491 result = func()
492 if result is not None:
493 from tornado.gen import convert_yielded
494
495 result = convert_yielded(result)
496 except Exception:
497 fut = Future() # type: Future[Any]
498 future_cell[0] = fut
499 future_set_exc_info(fut, sys.exc_info())
500 else:
501 if is_future(result):
502 future_cell[0] = result
503 else:
504 fut = Future()
505 future_cell[0] = fut
506 fut.set_result(result)
507 assert future_cell[0] is not None
508 self.add_future(future_cell[0], lambda future: self.stop())
509
510 self.add_callback(run)
511 if timeout is not None:

Callers

nothing calls this directly

Calls 5

add_futureMethod · 0.95
stopMethod · 0.95
convert_yieldedFunction · 0.90
future_set_exc_infoFunction · 0.90
is_futureFunction · 0.90

Tested by

no test coverage detected