This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: finalizer thread - please comment


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]