Skip to content

Commit

Permalink
Merge pull request python-trio#3001 from oakal510/master
Browse files Browse the repository at this point in the history
Updated docstring for from_thread_run to reflect how to get trio token
  • Loading branch information
Zac-HD authored May 18, 2024
2 parents 6f62575 + 23b2c87 commit 60b5804
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trio/_threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,8 @@ def from_thread_run(
"foreign" thread, spawned using some other framework, and still want
to enter Trio, or if you want to use a new system task to call ``afn``,
maybe to avoid the cancellation context of a corresponding
`trio.to_thread.run_sync` task.
`trio.to_thread.run_sync` task. You can get this token from
:func:`trio.lowlevel.current_trio_token`.
"""
return _send_message_to_trio(trio_token, Run(afn, args))

Expand Down

0 comments on commit 60b5804

Please sign in to comment.