File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -210,18 +210,23 @@ Scheduling callbacks
210
210
used later to cancel the callback.
211
211
212
212
This method is not thread-safe.
213
+ Note: Although this is safe to call from a signal handler (since it may not use locks),
214
+ the event loop will not wake up from a call to the IO multiplexer.
213
215
214
216
.. method :: loop.call_soon_threadsafe(callback, *args, context=None)
215
217
216
218
A thread-safe variant of :meth: `call_soon `. Must be used to
217
219
schedule callbacks *from another thread *.
220
+ The returned Handle, however, is not thread-safe.
218
221
219
222
Raises :exc: `RuntimeError ` if called on a loop that's been closed.
220
223
This can happen on a secondary thread when the main application is
221
224
shutting down.
222
225
223
226
See the :ref: `concurrency and multithreading <asyncio-multithreading >`
224
227
section of the documentation.
228
+
229
+ Note: this is safe to call from a signal handler (since it may not use locks)
225
230
226
231
.. versionchanged :: 3.7
227
232
The *context * keyword-only parameter was added. See :pep: `567 `
You can’t perform that action at this time.
0 commit comments