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

Method close

tornado/ioloop.py:365–390  ·  view source on GitHub ↗

Closes the `IOLoop`, freeing any resources used. If ``all_fds`` is true, all file descriptors registered on the IOLoop will be closed (not just the ones created by the `IOLoop` itself). Many applications will only use a single `IOLoop` that runs for the enti

(self, all_fds: bool = False)

Source from the content-addressed store, hash-verified

363 self._make_current()
364
365 def close(self, all_fds: bool = False) -> None:
366 """Closes the `IOLoop`, freeing any resources used.
367
368 If ``all_fds`` is true, all file descriptors registered on the
369 IOLoop will be closed (not just the ones created by the
370 `IOLoop` itself).
371
372 Many applications will only use a single `IOLoop` that runs for the
373 entire lifetime of the process. In that case closing the `IOLoop`
374 is not necessary since everything will be cleaned up when the
375 process exits. `IOLoop.close` is provided mainly for scenarios
376 such as unit tests, which create and destroy a large number of
377 ``IOLoops``.
378
379 An `IOLoop` must be completely stopped before it can be closed. This
380 means that `IOLoop.stop()` must be called *and* `IOLoop.start()` must
381 be allowed to return before attempting to call `IOLoop.close()`.
382 Therefore the call to `close` will usually appear just after
383 the call to `start` rather than near the call to `stop`.
384
385 .. versionchanged:: 3.1
386 If the `IOLoop` implementation supports non-integer objects
387 for "file descriptors", those objects will have their
388 ``close`` method when ``all_fds`` is true.
389 """
390 raise NotImplementedError()
391
392 @typing.overload
393 def add_handler(

Callers 15

test_tornadoMethod · 0.95
fMethod · 0.95
tearDownMethod · 0.45
tearDownMethod · 0.45
close_all_connectionsMethod · 0.45
handle_requestMethod · 0.45
transform_chunkMethod · 0.45
stopMethod · 0.45
_handle_connectionMethod · 0.45

Calls

no outgoing calls

Tested by 7

test_tornadoMethod · 0.76
fMethod · 0.76
tearDownMethod · 0.36
tearDownMethod · 0.36