This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Why does this program cause an NPE in LibgcjInternalFinalizerThread??
- From: Jeff Sturm <jsturm at one-point dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: tromey at redhat dot com, <java at gcc dot gnu dot org>
- Date: Wed, 20 Aug 2003 15:48:28 -0400 (EDT)
- Subject: Re: Why does this program cause an NPE in LibgcjInternalFinalizerThread??
On Wed, 20 Aug 2003, David Daney wrote:
> It seems that it is possible for a thread to be inside of
> natReference.cc holding the Reference's lock when the garbage collector
> stops the thread. If this were to happen, the garbage collector would
> block forever waiting to obtain the lock when it entered.
>
> Is this possible?
It shouldn't be possible. You're confusing stop-world GC with
finalization; they occur separately. Finalization is always done
asynchronously in a thread dedicated to it.
Jeff