
3 Dec
2006
3 Dec
'06
3:02 p.m.
Vyacheslav Akhmechet
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.