File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed 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):
55
55
56
56
57
57
class 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
+
59
61
If the handle is cancelled, the cancel scope surrounding the async function
60
62
will be cancelled too. It is also possible to link a future to the result
61
63
of the async function. If you do that, the future will evaluate to the
62
64
result of the function, and cancelling the future will cancel the handle too.
65
+
63
66
"""
64
67
65
68
__slots__ = ("_fut" , "_started" )
You can’t perform that action at this time.
0 commit comments