Skip to content

Commit 4f01a12

Browse files
miss-islingtonkumaraditya303graingert
authored
[3.13] gh-79149: document reentrant safety of loop.call_soon_threadsafe (GH-128662) (#128664)
gh-79149: document reentrant safety of `loop.call_soon_threadsafe` (GH-128662) (cherry picked from commit 4685401) Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Thomas Grainger <[email protected]>
1 parent 1383588 commit 4f01a12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ Scheduling callbacks
236236
another thread, this function *must* be used, since :meth:`call_soon` is not
237237
thread-safe.
238238

239+
This function is safe to be called from a reentrant context or signal handler,
240+
however, it is not safe or fruitful to use the returned handle in such contexts.
241+
239242
Raises :exc:`RuntimeError` if called on a loop that's been closed.
240243
This can happen on a secondary thread when the main application is
241244
shutting down.

0 commit comments

Comments
 (0)