Timeout.select
Summary:
There are two implementations of the `Timeout` module.
1. An implementation based on `Timer` (which is based on sigalrm) which works on Linux and OSX
2. An implementation where you need to manually check the timer which works on Windows
The manual checking is a pain. You basically need to create wrappers
around blocking I/O which makes sure to check the timeout.
This diff creates the wrapper around `Unix.select`, which allows us to
timeout `Unix.select` calls using the `Timeout` module.
Reviewed By: samwgoldman
Differential Revision:
D6628750
fbshipit-source-id:
26c59f311cbff6f25adeb97222e19f31aeba9865