Re:Show HN: Bringing multithreading to Python's async event ...
by nbsande on Thursday October 03, 2024 @11:51PM
(#41737644)
The use case I wrote it in mind with is FastAPI. In that case, there wouldn't be any change to the Python code. You'd just use a different ASGI server that would use this sort of multithreaded event loop. So instead of running it with uvicorn main:app, you'd run it with alternateASGI main:app.
I have an example of a very basic ASGI server that does just that towards the end of the blog
I have an example of a very basic ASGI server that does just that towards the end of the blog