readFile close behaviour
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Fri Oct 5 07:49:04 EDT 2001
05 Oct 2001 17:51:45 +0900, Jens Petersen <petersen at redhat.com> pisze:
> IMHO hugs is doing the right thing here. Shouldn't ghc also
> close semiclosed handles when all references to them have
> been dropped?
I guess it would close, but garbage collection didn't notice yet that
all references have been dropped.
BTW, it's not necessarily semiclosed: you are throwing away the
contents and it will be open or semiclosed dependent on how much is
read by readFile before returning (perhaps nothing and it's thus open).
If it was semiclosed, the physical handle could be closed immediately.
--
__("< Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTÊPCZA
QRCZAK
More information about the Glasgow-haskell-bugs
mailing list