diff --git a/docs/source/reference-core.rst b/docs/source/reference-core.rst index 58d583a39d..4ff10d1e4e 100644 --- a/docs/source/reference-core.rst +++ b/docs/source/reference-core.rst @@ -1820,6 +1820,11 @@ to spawn a child thread, and then use a :ref:`memory channel .. literalinclude:: reference-core/from-thread-example.py +You can also perform a non-blocking check for cancellation from threads spawned +by func:`trio.to_thread.run_sync`. + +.. autofunction:: trio.from_thread.check_cancelled + Threads and task-local storage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~