Files don't support non-blocking operation, they will always be flagged
as ready for read/write. This will work, but always blocks. There are
some "files" that are actually sockets or pipes for which this will in
fact work, but not for regular files.

Ah, I see. But it will work perfectly for pipes and sockets.

I saw your PipedProcess implementation https://gist.github.com/s-ludwig/8434299 and noticed that this spawns up to 4 threads, where only one would be required?

Or is thread creation really that cheap and it is not worth to special case such things?