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