threadWaitRead -package:rio

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.
Lifted version of threadWaitRead.
Generalized version of threadWaitRead.
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.
Equivalent to threadWaitRead.
Equivalent to threadWaitReadSTM.