On Sat, Jun 5, 2010 at 3:20 PM, Al <[email protected]> wrote:

> What does the exception stack trace say? Are you synchronizing access
> to the object before calling wait()? Just wait() without
> synchronization will cause an IllegalMonitorStateException.
>

Indeed, this problem likely has nothing to do with AsyncTask, but improper
use of wait.  There is nothing restricting you from using wait() from inside
of AsyncTask.  It's just running a thread.

That said, AsyncTask schedules all work on a single thread in the process.
 So if you try to schedule two things, and one may wait for the other, you
are likely going to cause a deadlock since the task can't complete, to allow
the other to run.

-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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