[Haskell-cafe] Re: File locked unnecessarily
ariep at xs4all.nl
Sun Dec 3 15:02:40 EST 2006
Vyacheslav Akhmechet <coffeemug at gmail.com> wrote:
> Are you using hGetContents? If you are, take a closer look at the
> documentation. The function creates a lazy stream and until you finish
> reading from it the file will be in the "semi-closed" state (which
> means it will be locked).
No. I read/write using functions from SerTH, a serialisation library. I
assume that the decoding function does not have hGetContents's lazy
behaviour. At any rate, I close the file with hClose after use.
More information about the Haskell-Cafe