Same as the built-in wait_for_input/3.
Used to allow for interrupts and timeouts on Windows. A redesign of the
Windows socket interface makes it impossible to do better than Windows select()
call underlying wait_for_input/3. As input
multiplexing typically happens in a background thread anyway we accept
the loss of timeouts and interrupts.