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 :-)
On Wednesday, February 6, 2013 7:19:53 PM UTC-5, Nathan wrote: > > I'm just looking at the definition of Thread.isDaemon. > > It seems like a nice feature. The deamon Thread won't stop the process > from exiting. > > But wait a second. Do non daemon thread stop a process from exiting in > Android? I wasn't aware that any thread could stop Android from killing a > process anyway. So isDaemon really has no practical meaning in Android. > > Am I right? > > Nathan > > public final boolean isDaemon () > Added in API level > 1<http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels> > > Returns a boolean indicating whether the receiver is a daemon Thread (true) > or not (false) A daemon Thread only runs as long as there are non-daemon > Threads running. When the last non-daemon Thread ends, the whole program > ends no matter if it had daemon Threads still running or not. > Returns > > - a boolean indicating whether the Thread is a daemon > > See Also > > - > setDaemon(boolean)<http://developer.android.com/reference/java/lang/Thread.html#setDaemon(boolean)> > > -- -- 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.

