Gabriella439 / Haskell-Pipes-Safe-Library

Safety for the pipes ecosystem
BSD 3-Clause "New" or "Revised" License
26 stars 21 forks source link

Flushing the pipeline on error #31

Closed 3noch closed 7 years ago

3noch commented 7 years ago

I have an app that was suffering from a problem with buffering (data never made it into the output file). It seems like there should be a way to set up a pipeline that flushes on [some] exceptions. In my case, the app never ends and Ctrl+C is how I tell it to stop writing data. Does such a thing exist already?

Gabriella439 commented 7 years ago

So I think this is superseded by #30 since if we fix the finalization error that you ran into then hClose should run and flush the data on any exceptions

3noch commented 7 years ago

Yes I was not aware that hClose did a flush, so this is a separate issue.