On Wednesday, February 6, 2013 4:52:00 PM UTC-8, Streets Of Boston wrote:
>
> It's mostly just 'ported' from regular Java, where a process could not do 
> a normal 'exit' when non-daemon thread were still running. 
> But you're right. It would seem that if android decides to 'kill' your 
> app, it doesn't much matter whether there are some daemon threads still 
> running or not. 
>
 

> Still, be on the safe side, don't create these non-daemon thread :-)
>

I haven't read anything that encourages developers to set isDaemon() on all 
their threads, and I don't think it is set by default in ThreadPools, 
AsyncTask, or in any other commonly used framework classes. 

So unless you've written your own ThreadPools, etc, I don't think anyone is 
following that advice. 

I've run across code that is explicitly calling setDaemon(true). I can't 
figure out why the developer did that and if it makes any real difference. 
The developer can't remember either. Even though the developer is me. 

Nathan 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to