[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: closing reader / writer
Shiro Kawai <shiro@xxxxxxxx> 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