]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-79149: document reentrant safety of `loop.call_soon_threadsafe` (#128662)
authorKumar Aditya <kumaraditya@python.org>
Thu, 9 Jan 2025 09:19:05 +0000 (14:49 +0530)
committerGitHub <noreply@github.com>
Thu, 9 Jan 2025 09:19:05 +0000 (09:19 +0000)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Doc/library/asyncio-eventloop.rst

index ccb362d8c31ddff3a387deeb2bbb3425af31c974..bfc0d16f023e5e07c3c17712daa1ea8526bf59a4 100644 (file)
@@ -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.