Replies: 1 comment 5 replies
-
Well, as you can see from the issue, it was resolved. From AnyIO 4.0 onwards, that is no longer a problem. The only gotcha is how scoped cancellation works. A pattern where asyncio code uses |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Things to check first
Feature description
I am looking for documentation to advise if mixing anyio and asyncio code is supported. My use case is a large Python 3.8 asyncio code base. I'd like to use anyio in order to incrementally use SC for creating and cancelling tasks. I have run numerous tests using a mix of both and the behaviour looks correct. However I am aware of #374 which occurs when mixing between anyio 3.x and asyncio where the CancelledError does not propagate out of the task group context manager. Are there any other gotchas one should be aware of when using a mix of asyncio and anyio for task management?
Use case
Incrementally converting from normal asyncio task management to Structured Concurrency with anyio.
Beta Was this translation helpful? Give feedback.
All reactions