threadWaitRead -is:exact
Block the current thread until data is available to read on the given
file descriptor (GHC only).
This will throw an
IOError if the file descriptor was closed
while this thread was blocked. To safely close a file descriptor that
has been used with
threadWaitRead, use
closeFdWith.
Returns an STM action that can be used to wait for data to read from a
file descriptor. The second returned value is an IO action that can be
used to deregister interest in the file descriptor.