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.

Ali Chousein wrote:
> Hi,
>
> I have two AsyncTasks running; let's say A1 and A2. A2 is manipulating
> the data produced by A1 (in fact is a typical producer-consumer
> scenario). It's very tempting to use wait() inside doInBackground()
> implementation of A2, BUT this causes an IllegalMonitorStateException.
> Is it really not possible to "wait()" inside an AsyncTask? What to do
> when you have an AsyncTask which needs to wait for something?
>
> Thank you in advance,
>
> -Ali

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to