instead of joining threads... u need to use a handler and a thread... n keep
sending msgs from the thread to the handler...
the handler jus reads the message say for the amt of progress n updates d
progress bar accordingly...
i think this mght help u... jus try it out...

On Tue, Jun 16, 2009 at 12:02 PM, Sven Bendel <[email protected]> wrote:

>
> Thanks for the fast answers!
>
> Unfortunately I found out, that I can't use AsyncTask for my task
> anyway...
>
> The get() method seems to provide a neat way to pseudo-join the
> AsyncTask and the main UI-thread - I found it yesterday evening, too,
> and played around with it a little bit. The only problem is, that if
> you use it in the main thread, it will wait for the result of
> doInBackground and execute all the onProgressUpdate stuff *after*
> doInBackground has finished - this destroys all parallelism you
> intended to create using the AsyncTask wrapper. That's the reason why
> I can't use AsyncTask and in fact threads in general for my purposes
> because join() would do the same thing...
>
> Regards,
> Sven
>
> PS.: @Streets of Boston: I've tried your idea of writing setter/getter
> methods for the AsyncTask - background thread and it works! The only
> problem is, that when I try to join the main and the AsyncTask thread
> I get a deadlock as the main thread waits for the background thread to
> die, but it seems, that it dies *after* the last onProgressUpdated()
> was executed which is a task of the (now waiting!!!) main thread. But
> nevertheless I'm happy to have gained access to the background thread
> - maybe I can use this in another context. Thanks again!
> >
>


-- 
Regards,
Sujay
Samuel Goldwyn<http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html>
- "I'm willing to admit that I may not always be right, but I am never
wrong."

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to