classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Joining all non-daemon threads


From: Patrick Doyle
Subject: Joining all non-daemon threads
Date: Mon, 17 Sep 2001 19:02:48 -0400 (EDT)

I'm wondering how JVMs implement non-daemon threads.  The VM must join all
active non-daemon threads before it exits, so that the VM doesn't exit
until all non-daemon threads terminate.  Then, I gather, when all
non-daemon threads are done, it must terminate all daemon threads and then
exit.

What's the easiest way to implement this?  Does ThreadGroup provide enough
functionality to do it?  Or do I have to maintain a list of active threads
myself?  Does Classpath have any additional functionality to support this?

--
Patrick Doyle
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]