achimnol / aiotools

Idiomatic asyncio utilties
https://aiotools.readthedocs.io
MIT License
154 stars 12 forks source link

server: Add wait_timeout and properly close pipe fds during afork #46

Closed achimnol closed 2 years ago

achimnol commented 2 years ago

Sometimes interrupting the process using aiotools.afork() hangs due to signal race. Let's minimize the exposed surface of event loops in the child process.

codecov[bot] commented 2 years ago

Codecov Report

Merging #46 (e22e1ae) into main (c598e31) will decrease coverage by 0.56%. The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
- Coverage   79.24%   78.68%   -0.57%     
==========================================
  Files          16       16              
  Lines        1306     1323      +17     
==========================================
+ Hits         1035     1041       +6     
- Misses        271      282      +11     
Impacted Files Coverage Δ
src/aiotools/server.py 49.65% <33.33%> (-0.52%) :arrow_down:
src/aiotools/fork.py 75.16% <55.55%> (-2.94%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c598e31...e22e1ae. Read the comment docs.