[android-developers] Re: Asynctask threads never end!

2010-03-14 Thread Bob Kerns
We're getting just a bit off-topic, but I'll continue briefly in hope it sheds some useful light somewhere... With what tool were you identifying a "zombie" thread? Did you examine where it was on its stack? If it has an active Java stack, then it's still busy, and not a zombie. A thread OBJECT

Re: [android-developers] Re: Asynctask threads never end!

2010-03-13 Thread Mark Murphy
Ken Warner wrote: > Is AsyncTask a part of the Android SDK? Yes. android.os.AsyncTask arrived in Android 1.5. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.3 Available! -- You received

Re: [android-developers] Re: Asynctask threads never end!

2010-03-13 Thread Ken Warner
I'm not trying to argue -- but I've seen dead threads (zombies) hang around for a long time. Null all possible references in your code *AFTER* you are done with the thread and do an explicit gc(). I didn't say that nulling a reference would kill the thread. It only helps garbage collection. Th

[android-developers] Re: Asynctask threads never end!

2010-03-13 Thread Bob Kerns
What evidence do you have of this? What exactly do you mean by a zombie thread? I've been programming Java since sometime near when it came out -- well over a decade, on various platforms. I've never seen anything I'd term a zombie thread, nor a thread problem that would be solved by nulling threa

[android-developers] Re: Asynctask threads never end!

2010-03-13 Thread Gabriel Simões
So, there´s nothing to worry about then! Thanks for your answers and help! On 13 mar, 15:42, Streets Of Boston wrote: > Like Mark said, AsyncTasks use a pool of threads that manages itself. > > An AsyncTask is NOT a thread. It uses a pool of threads to execute a > task on. It is based on the Futu

[android-developers] Re: Asynctask threads never end!

2010-03-13 Thread Streets Of Boston
Like Mark said, AsyncTasks use a pool of threads that manages itself. An AsyncTask is NOT a thread. It uses a pool of threads to execute a task on. It is based on the FutureTasks and ExecutorService of the java.util.concurrent package. When you create a new AsyncTask, you don't create a new threa