| ▲ | three14 5 hours ago | |
The thing that burned me with asyncio primitives is that calling an async function doesn't even schedule it (by default). The pattern for fire-and-forget is impossible to guess when coming from any other language - although it's called out in the docs. You must also call create_task AND you must maintain a collection of tasks because otherwise the task might not run, because it can be garbage collected before running, AND you must clean up completed tasks from your collection. | ||
| ▲ | whilenot-dev 4 hours ago | parent [-] | |
> The pattern for fire-and-forget is impossible Good, that's an antipattern in the coroutines concurrency model. | ||