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

Function start

tornado/autoreload.py:114–129  ·  view source on GitHub ↗

Begins watching source files for changes. .. versionchanged:: 5.0 The ``io_loop`` argument (deprecated since version 4.1) has been removed.

(check_time: int = 500)

Source from the content-addressed store, hash-verified

112
113
114def start(check_time: int = 500) -> None:
115 """Begins watching source files for changes.
116
117 .. versionchanged:: 5.0
118 The ``io_loop`` argument (deprecated since version 4.1) has been removed.
119 """
120 io_loop = ioloop.IOLoop.current()
121 if io_loop in _io_loops:
122 return
123 _io_loops[io_loop] = True
124 if len(_io_loops) > 1:
125 gen_log.warning("tornado.autoreload started more than once in the same process")
126 modify_times: Dict[str, float] = {}
127 callback = functools.partial(_reload_on_update, modify_times)
128 scheduler = ioloop.PeriodicCallback(callback, check_time)
129 scheduler.start()
130
131
132def wait() -> None:

Callers

nothing calls this directly

Calls 2

startMethod · 0.95
currentMethod · 0.80

Tested by

no test coverage detected