Talk:IPC via named pipe

From Rosetta Code
Revision as of 09:38, 30 September 2011 by rosettacode>Dkf (Ooooh! That was hard!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is tricky! The “in” reader side is normal asynchronous IO (the pipe becomes readable when there's data available) but the “out” writer side is very awkward because you can't open the writer side of a FIFO if there is no reader there. You've either got to use a blocking open() — which might or might not work with a threaded solution — or deal with the failure to open() it in non-blocking mode by polling regularly. Tricky stuff! –Donal Fellows 09:38, 30 September 2011 (UTC)