diff options
author | Kumar Aditya <kumaraditya@python.org> | 2025-01-09 09:19:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-09 09:19:05 (GMT) |
commit | 4685401845ba3e2ab8c9f4a9a10aa2969b11985f (patch) | |
tree | 98fb3b3b1e4f8cf464f126f99cbf273f441627c5 /Doc/library | |
parent | a1284e97979ff73ad72ad06c796b904137950576 (diff) | |
download | cpython-4685401845ba3e2ab8c9f4a9a10aa2969b11985f.zip cpython-4685401845ba3e2ab8c9f4a9a10aa2969b11985f.tar.gz cpython-4685401845ba3e2ab8c9f4a9a10aa2969b11985f.tar.bz2 |
gh-79149: document reentrant safety of `loop.call_soon_threadsafe` (#128662)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/asyncio-eventloop.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index ccb362d..bfc0d16 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -246,6 +246,9 @@ Scheduling callbacks another thread, this function *must* be used, since :meth:`call_soon` is not thread-safe. + This function is safe to be called from a reentrant context or signal handler, + however, it is not safe or fruitful to use the returned handle in such contexts. + Raises :exc:`RuntimeError` if called on a loop that's been closed. This can happen on a secondary thread when the main application is shutting down. |