Skip to content

Commit 3240bc6

Browse files
dukecat0ambv
andauthored
bpo-44508: [Doc] Document failure mode for loop.call_soon_threadsafe (GH-27688)
Co-authored-by: Łukasz Langa <[email protected]>
1 parent 599f5c8 commit 3240bc6

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)