From: Paul Brannan Date: 2004-11-16T00:02:06+09:00 Subject: Re: Finalizers... On Wed, Nov 10, 2004 at 09:23:04PM +0900, Michael Neumann wrote: > Are finalizers (ObjectSpace.define_finalizer) executed atomicly? Or can > they be interrupt by other finalizers (or threads)? I believe finalizers are only called from the garbage collector, and the garbage collector doesn't do anything if called re-entrantly. Also, as Carlos pointed out, finalizers are run with Thread#critical=true, so they won't be interrupted by another thread nor will they be interrupted by a timeout. I think that covers all the cases, except if you explicitly call the finalizer proc yourself. Paul