posixFileReadChannel

fun posixFileReadChannel(fd: Int): ByteReadChannel

Creates a ByteReadChannel that will read bytes from the specified file descriptor fd.

This is accomplished by creating a dedicated thread that blocks on reads before queueing to a ByteChannel for suspended reading, so only use when needed.