From: meowmeowmeowcat Date: Tue, 17 Aug 2021 22:55:04 +0000 (+0800) Subject: bpo-44508: [Doc] Document failure mode for loop.call_soon_threadsafe (GH-27688) X-Git-Tag: v3.11.0a1~390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3240bc62f4e0afa09964f3afc845697f0a0806b9;p=thirdparty%2FPython%2Fcpython.git bpo-44508: [Doc] Document failure mode for loop.call_soon_threadsafe (GH-27688) Co-authored-by: Ɓukasz Langa --- diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index 98ec65dde887..147fb2b9bf60 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -216,6 +216,10 @@ Scheduling callbacks A thread-safe variant of :meth:`call_soon`. Must be used to schedule callbacks *from another thread*. + 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. + See the :ref:`concurrency and multithreading ` section of the documentation.