Skip to content

Commit d98484d

Browse files
Document trio.from_thread.check_cancelled
1 parent 357e00e commit d98484d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/source/reference-core.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,6 +1820,11 @@ to spawn a child thread, and then use a :ref:`memory channel
18201820

18211821
.. literalinclude:: reference-core/from-thread-example.py
18221822

1823+
You can also perform a non-blocking check for cancellation from threads spawned
1824+
by func:`trio.to_thread.run_sync`.
1825+
1826+
.. autofunction:: trio.from_thread.check_cancelled
1827+
18231828
Threads and task-local storage
18241829
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18251830

0 commit comments

Comments
 (0)