daphne
daphne copied to clipboard
Improve max-worker sync-to-async handling.
#422 ports the old ASGI_THREADS
logic from asgiref
. (C.f. #319)
Improvements:
- Move the initialisation of the default executor into
Server.run()
(when configuring the loop). - Adjust the test from #422 to set up the
Server
instance, so that's put into effect. - Add a
--max-workers
CLI flag, with tests etc., to apply this. - Deprecate the env var approach.