Use Selectors module for more robust and efficient syscalls #7882
Twitter was running into the error
In the process, we found that it is more efficient and robust to use the more modern syscalls of
This will close #7880.
For Python 3 code, use the new selectors library. Python 2 code stays the same as before, since the library does not exist for it and we are soon going to drop Python 2.
requested review from
Jun 12, 2019
Keeping this as a draft for now because I'm going to push this directly to a branch so that we get wheels. I want to run this against Twitter's sandbox, which will cover substantially more Nailgun use cases than our CI covers.
Otherwise, ready for the review.
Eric-Arellano left a comment
It causes 87 failing targets in Twitter's sandbox, and it had done this in the prior sandbox run so it's a consistent issue. See https://docs.google.com/spreadsheets/d/1jhE1rnj5Q34wzlML5fRPtbvl8_qDT6WwHcD4zDbQ330/edit#gid=0 (requires Twitter gmail).
Probably not in Pants, because we don't have enough targets to get the
Note that before merging anything, I'm going to run this against Twitter's sandbox to confirm it fixes the issue + doesn't introduce new issues.