Skip to content

Commit bbb1076

Browse files
bpo-44508: [Doc] Document failure mode for loop.call_soon_threadsafe (GH-27688)
Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit 3240bc6) Co-authored-by: meowmeowmeowcat <[email protected]>
1 parent f20f061 commit bbb1076

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ Scheduling callbacks
216216
A thread-safe variant of :meth:`call_soon`. Must be used to
217217
schedule callbacks *from another thread*.
218218

219+
Raises :exc:`RuntimeError` if called on a loop that's been closed.
220+
This can happen on a secondary thread when the main application is
221+
shutting down.
222+
219223
See the :ref:`concurrency and multithreading <asyncio-multithreading>`
220224
section of the documentation.
221225

0 commit comments

Comments
 (0)