[concurrency-interest] Termination of daemon threads

David Holmes dcholmes at optusnet.com.au
Tue Apr 1 00:41:50 EDT 2008


A daemon thread should never do anything critical. Daemon threads just
"vanish" when the process is terminated. Though for Sun's VM they are at
least brought to a system "safe-point" first - though executing native code
is considered being at a "safe-point" ie outside of the VM.

It probably could be documented better.

David Holmes

> -----Original Message-----
> From: concurrency-interest-bounces at cs.oswego.edu
> [mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of Dimitris
> Andreou
> Sent: Tuesday, 1 April 2008 2:02 PM
> To: concurrency-interest at cs.oswego.edu
> Subject: [concurrency-interest] Termination of daemon threads
>
>
> Hi all,
>
> Here is my question: How are daemon threads terminated? What if they are
> in the middle of a critical operation, like writing to a file? They seem
> to exit immediately. How could that be safe? Or a daemon thread should
> never do anything critical, but always delegate such work to a
> non-daemon thread? If any case, shouldn't it be documented in
> java.lang.Thread?
>
> Thanks
> Dimitris Andreou
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>



More information about the Concurrency-interest mailing list