This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: finalizer thread - please comment
- To: tromey at redhat dot com
- Subject: Re: Patch: finalizer thread - please comment
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Fri, 05 Oct 2001 16:35:27 +1200
- CC: Java Patch List <java-patches at gcc dot gnu dot org>
- References: <87itdvfnvp.fsf@creche.redhat.com>
Tom Tromey wrote:
>If I check this in it will break the no-thread build. What should we
>do about this? I can think of a few things.
>
>One idea would be to lazily create the new thread insie
>FinalizerThread itself.
>
Thats probibly a good idea anyway - starting the Finalization thread
from FirstThread isn't right because it won't get started if the runtime
is started via invocation. Another option would be to start it in
_Jv_CreateJavaVM, which should be run regardless of how the runtime is
invoked.
I agree we should keep around the no-threads config if possible, if only
because its occasionally useful for testing/porting, and it clearly
shows the minimum interface needed to implement the threads layer.
Running finalizers in the same thread with no-threads isn't a problem,
as there are also no locks?
You should probibly also set a thread name in the constructor, so it
shows up in stack traces etc.
regards
Bryce.