daphne icon indicating copy to clipboard operation
daphne copied to clipboard

Improve max-worker sync-to-async handling.

Open carltongibson opened this issue 1 year ago • 0 comments

#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.

carltongibson avatar Jul 06 '22 10:07 carltongibson