[concurrency-interest] Why never daemon threads with defaultthreadfactory?

Peter Veentjer - Anchor Men p.veentjer at anchormen.nl
Wed Sep 7 03:00:22 EDT 2005



>>The default thread factory doesn't create daemon threads because the 
>>common case is that you want any tasks submitted to an executor to 
>>actually get executed. Daemon threads wouldn't support this unless you

>>always used an application thread to wait until the executor had 
>>finished.
Aha ok. 

>>If you truly want daemon threads it is easy to change the thread 
>>factory.
I already did and that was why I was wondering why the daemon property 
with the default threadfactory Was set to false even though the daemon 
property of the Threadgroup is true.

>>Note that daemon threads are deceptive creatures. 
>>Only the most trivial of tasks can be arbitrarily terminated in the 
>>middle of processing - as would happen if the JVM terminated.
I know (it happend to me once). But I`m creating a new threadfactory 
where I have more control and was wondering why things are done in the 
default threadfactory.

Met vriendelijke groet,

Peter Veentjer
Anchor Men Interactive Solutions - duidelijk in zakelijke
internetoplossingen

Praediniussingel 41
9711 AE Groningen

T: 050-3115222
F: 050-5891696
E: p.veentjer at anchormen.nl
I : www.anchormen.nl



More information about the Concurrency-interest mailing list