On Thu, Jan 6, 2011 at 7:19 PM, Chris <cjse...@gmail.com> wrote:
> Well I'll go one step further and explain the problem. Most of the app
> is a native C library.

Ahhhhhhhhhhhh.

> The native code runs entirely on the OpenGL
> thread. Occasionally, the user will perform an operation that requires
> a function on the UI thread to run. It's imperative that the function
> runs and returns before the GL thread is allowed to continue because
> the library needs a piece of hardware to be enabled (which is done on
> the UI thread). The UI is Thread A in my example and the OpenGL thread
> is Thread B in my example.

OK. I'll buy that. Personally, I'm more of a fan of
java.util.concurrent than wait()/notify(), but either should work.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 2.3 Programming Books: http://commonsware.com/books

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