4 ms·
> The OP article concerns a peculiar implementation detail in the lowest level that makes it very easy to write bugs at the highest level. Are other async impl
by heavyset_go 4y ago
> The OP article concerns a peculiar implementation detail in the lowest level that makes it very easy to write bugs at the highest level.
Are other async implementations using the asyncio.Task abstraction? I haven't looked into it, but I assumed that asyncio.Task was tied to the asyncio implementation and event loop.
- nbadg 4y agoasyncio.Task is part of the asyncio event loop framework. So any event loop implementation that conforms to that framework will have to have one (including the default event loop implementation that ships with asyncio). So for example, uvloop, which is an alternative event loop implementation that works with the asyncio event loop framework, also uses asyncio Tasks. Other event loop frameworks can do whatever they want, and presumably, wouldn't be importing from asyncio. Whether they have a similar abstraction is completely up to the framework itself. Trio, for example, doesn't have a concept of a task object at all, because it enforces a strict tree structure for tasks.