uvicorn
uvicorn copied to clipboard
Unblock periodically the main process to check for signal
Summary
This adds a periodic unblock of the main process to check for signals sent like SIGINT or SIGTERM. In windows the main process does not listen to signals when blocked by the wait call.
Closes: #1972
Checklist
- [x] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
- [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
- [x] I've updated the documentation accordingly.