Skip to content

Commit

Permalink
Document trio.from_thread.check_cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
richardsheridan committed Aug 8, 2022
1 parent 357e00e commit d98484d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/source/reference-core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit d98484d

Please sign in to comment.