Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a ResourceWarning caused by SimpleAdaptivePool (#7009)
This was a huge pain to track down and fix and probably not worth spending my morning on it. I ended up editing my installed `subprocess.py` to see what the command line was for the process that was leaking. I then spent a long time thinking there might be a uvloop bug, because I confused myself and thought we were using uvloop in the test suite (after I added a debug print that failed under uvloop---but the failure occured when running the real server). The confusing part to me was that I felt that a subprocess protocol shouldn't be getting notified that it has disconnected unless the child process has actually exited, but I had missed that the protocol we use to communicate with the workers is a normal socket protocol which *obviously* closes when the socket does. Anyway the fix is to arrange to wait for the children to exit, which like everything involving protocols is annoying because the callback isn't async.
- Loading branch information