3 ms·
ASGI is a bad solution to the concurrency issues as the ecosystem is heavily centralised around asyncio (which is ``java.lang.Thread`` for async/await, with all
by Starlevel001 5y ago
ASGI is a bad solution to the concurrency issues as the ecosystem is heavily centralised around asyncio (which is ``java.lang.Thread`` for async/await, with all the pitfalls included).
- zbentley 5y agoCould you elaborate on what you mean by that? I can think of two interpretations, both wrong: 1. Asyncio is like java.lang.Thread in that it's very low level; which isn't accurate: it's totally acceptable and easy to write async concurrency using asyncio (the python async stdlib) directly. While frameworks like Trio are nice they're nowhere near as necessary when working async as thread/pool managers are in Java. 2. Asyncio is like java.lang.Thread in that it has similar pitfalls to threaded programming in general. This is also untrue: in async programming in general, race conditions are much harder to write, and concurrent modification issues aren't a risk at all in Python async code the way they are in threaded Python or Java.