Re: closing reader / writer
Michael Sperber 08 Jun 2005 07:24 UTC
Shiro Kawai <xxxxxx@lava.net> writes:
> What I can do in the 'close' procedure is affected so much by
> whether 'close' procedure may be called from finalizers or not.
> Because of the asynchronous nature of the finalizers,
> when the finalizer is involved, I need to write 'close' procedure
> with care as if I'm writing preemptive multithreaded program,
> even if the program itself is single threaded.
I don't understand how the asynchronous nature of finalizers comes in:
By nature, in this scenario, the finalizer can only be called *after*
the Scheme program is finished with a reader or writer, so no
interleaving with explicit calls from the user program is possible.
My thinking is that a program would have trouble even observing that a
finalizer has been called in a meaningful manner. I'm probably
missing something---could you help me out?
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla