This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH]: natThread.cc: Destroy join sync objects in finalizer
- From: Tom Tromey <tromey at redhat dot com>
- To: gnustuff at thisiscool dot com
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>
- Date: 11 Sep 2004 11:51:15 -0600
- Subject: Re: [PATCH]: natThread.cc: Destroy join sync objects in finalizer
- References: <FDGDIDTMIWSTR2WA7YV6Z6Z0XRONP.4141a31d@p733>
- Reply-to: tromey at redhat dot com
>>>>> "Mohan" == Mohan Embar <gnustuff@thisiscool.com> writes:
Mohan> The GC finalizer finalize_native in natThread.cc should destroy
Mohan> the join synchronization objects if the target platform supports
Mohan> these destruction operations (which isn't the case for Linux and
Mohan> -DLINUX_THREADS but is the case for Win32).
This isn't a problem with your patch, but what happens if a user
writes a subclass of Thread that has a finalize method which
resurrects the Thread? Won't we start referring to freed data in this
code?
Probably instead of a finalizer we should use a reference queue here
instead.
Tom