File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ On Python versions with native contextvars support (3.7+), a Trio task
2+ started from asyncio context (using :func: `trio_as_aio `,
3+ :meth: `~BaseTrioEventLoop.trio_as_future `, etc) will now properly
4+ inherit the contextvars of its caller. Also, if the entire
5+ trio-asyncio loop is cancelled, such tasks will no longer let
6+ `trio.Cancelled ` exceptions leak into their asyncio caller.
Original file line number Diff line number Diff line change @@ -55,11 +55,14 @@ def _raise(self, exc):
5555
5656
5757class AsyncHandle (ScopedHandle ):
58- """A ScopedHandle associated with the execution of an async function.
58+ """A ScopedHandle associated with the execution of a Trio-flavored
59+ async function.
60+
5961 If the handle is cancelled, the cancel scope surrounding the async function
6062 will be cancelled too. It is also possible to link a future to the result
6163 of the async function. If you do that, the future will evaluate to the
6264 result of the function, and cancelling the future will cancel the handle too.
65+
6366 """
6467
6568 __slots__ = ("_fut" , "_started" )
You can’t perform that action at this time.
0 commit comments