I'm not quite sure what you want.

But about this sentence "Block Thread i am planning to keep as GUI
thread":
I assume you mean that you plan to block the main GUI thread until a
message arrives?
This is a bad idea. Never block the GUI thread. If you do, your app's
users get the "application not responding" message and an offer to
kill your app.

Personally, I use the ExecutorService classes from
java.util.concurrent to execute background tasks. Then, when done,
these tasks will post (post, postDelayed, etc) their results back to
the GUI thread.

On Apr 21, 8:45 am, Asif k <[email protected]> wrote:
> Hi,
>
> I'm trying to use a ConditionVariable to control the execution
> sequence of two threads. I can create a ConditionVariable in one
> thread and block on it. But I would like to be able to access it from
> another Thread  and unblock it from that thread.. ?
>
>    Blocked Thread i am planning to keep as GUI thread and it should
> update the messages which are sent by b/g thread on the screen during
> its block state and will be unblocked by b/g thread in the end by
> calling open(); method.
>
>   Can you please the proper way to accomplish this??
>
> Thanks,
> Asif
--~--~---------~--~----~------------~-------~--~----~
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