Open 3noch opened 7 years ago
System.IO.hClose
should ensure that all buffers are flushed, regardless of the buffering mode used. How were you acquiring and releasing the Handle
?
I was using withFile
.
In that case, this may be a more sinister bug than I thought. I was using Ctrl+C
to stop the long-running process. I wonder if the async exception didn't get handled appropriately.
Yeah, this sounds like a bug in pipes-safe
exception handling if it's not finalizing the Handle
. I will investigate, although it might take me a few days to get to this
Also, in the meantime, do you happen to have a reproducing test case for your problem that I can use?
I'll try to get one to you.
I had a bug where my output file was always empty. I tracked it down to the default buffering mode. I think it would be better offer a variant of
withFile
that explicitly specifies the buffering mode.What do you think?