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

Method close

tornado/platform/asyncio.py:512–525  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

510 self.add_reader(self._waker_r, self._consume_waker)
511
512 def close(self) -> None:
513 if self._closed:
514 return
515 with self._select_cond:
516 self._closing_selector = True
517 self._select_cond.notify()
518 self._wake_selector()
519 if self._thread is not None:
520 self._thread.join()
521 _selector_loops.discard(self)
522 self.remove_reader(self._waker_r)
523 self._waker_r.close()
524 self._waker_w.close()
525 self._closed = True
526
527 async def _thread_manager(self) -> typing.AsyncGenerator[None, None]:
528 # Create a thread to run the select system call. We manage this thread

Callers 1

_thread_managerMethod · 0.95

Calls 5

_wake_selectorMethod · 0.95
remove_readerMethod · 0.95
notifyMethod · 0.80
joinMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected