the code has to work especially hard to keep things in the same thread django/asgiref: ASGI specification and utilities https://github.com/django/asgiref/