pgjones / hypercorn

Hypercorn is an ASGI and WSGI Server based on Hyper libraries and inspired by Gunicorn.
MIT License
1.12k stars 102 forks source link

Type hint for check_multiprocess_shutdown_event is confusing for mypy #247

Open doc-sheet opened 2 months ago

doc-sheet commented 2 months ago

Hi! For now type hint for shutdown_event is multiprocessing.synchronize.Event

I guess it should be threading.Event instead: simple way to create and pass such event is multiprocessing.Manager().Event() and that's just a threading.Event clone.

references:

  1. multiprocessing.managers.SyncManager.Event
  2. multiprocessing.Event