do print ("READ START",x) ; res <- readFile x ; print ("READ STOP",x)
; return res

Unless you've defined your own version of 'readFile', to mean read
entire file now, the first 'print' is optimistic and the second 'print' is a 
lie.

Claus

do print ("WRITE START",x); writeFile x src ; print ("WRITE STOP",x)

I then get on the console:

WRITE START foo
WRITE STOP foo
READ START foo
openFile doesn't have permission to open foo.

The writeFile/readFile are happening in different threads, and they
usually succeed - but not always. The bug seems to go away when I add
performGC just after writeFile. My guess is that something in the
openFile/hClose pair isn't really closed until a garbage collection
happens. All this is using GHC 6.10.2 on XP through Cygwin.

I'm happy to supply more details if you can think of anything that will help,

Thanks

Neil
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to