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

Function wait

tornado/autoreload.py:132–141  ·  tornado/autoreload.py::wait

Wait for a watched file to change, then restart the process. Intended to be used at the end of scripts like unit test runners, to run the tests again after any source file changes (but see also the command-line interface in `main`)

()

Source from the content-addressed store, hash-verified

130
131
132def wait() -> None:
133 class="st">"""Wait for a watched file to change, then restart the process.
134
135 Intended to be used at the end of scripts like unit test runners,
136 to run the tests again after any source file changes (but see also
137 the command-line interface in `main`)
138 class="st">"""
139 io_loop = ioloop.IOLoop()
140 io_loop.add_callback(start)
141 io_loop.start()
142
143
144def watch(filename: str) -> None:

Callers 1

mainFunction · 0.85

Calls 2

add_callbackMethod · 0.95
startMethod · 0.95

Tested by

no test coverage detected