While this was initially built with enhancing CPU utilization for FastAPI servers in mind, the approach can be used with more general async programs too.
If you’re interested in diving deeper into the details, I’ve written a blog post about it here: https://www.neilbotelho.com/blog/multithreaded-async.html