mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.12] gh-79149: document reentrant safety of loop.call_soon_threadsafe (GH-128662) (#128665)
gh-79149: document reentrant safety of `loop.call_soon_threadsafe` (GH-128662)
(cherry picked from commit 4685401845)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
This commit is contained in:
parent
4c130c9238
commit
a784cdf6e7
1 changed files with 3 additions and 0 deletions
|
|
@ -236,6 +236,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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue