Hi all,
here's the code:
writer =
do threadDelay 100000
threadWaitWrite fd
fdWrite fd ((show x) ++ "\n")
writer fd (x+1)
pretty simple, it just keeps writing. What happens though is that,
eventually, the reader goes away, i.e. "closes" the fifo.
When that happens I get:
ghc: fdWriteBuf: resource vanished (Broken pipe)
which make sense, sort of. I write a value, let's say 10, and the
reader reads it. It's the last value so it "closes" the fifo.
Now there's nothing reading, so when I get to threadWaitWrite, I would
expect the program to wait, just as it does when it starts up and there
is no reader.
looking for some guidance.
Thank you,
Brian
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe