On Fri, Jan 9, 2009 at 1:22 PM, Stoyan Damov <[email protected]> wrote:

> I do "yield" to the main thread by calling mainActivity.runOnUiThread
> w/ a no-op (cached) runnable once per second but I guess that's not
> enough. I'll try increasing that to see if it will make a difference.
> I'd rather run the game @ 40 fps by losing ~15 fps because of yielding
> than losing ~30 fps because of touch event throttling.


If I am reading that right, that's not a yield, that is just adding more CPU
using work on the main thread. :)  What you want to do is force the main
thread to actually stop running for a bit after processing an event, so that
it isn't using the CPU and your other thread can run and the window manager
doesn't immediately turn around and give you another event with more work to
do.


> I'd rather "control" the priority myself :)


How are you going to control the priority yourself?

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