Forum Discussion
MazeWizzard
14 years agoVisitor
Well, I agree philosophically with TheEndless about playing nice in a multi-tasking environment and not chewing up resources needlessly. It doesn't appear to block with my tests either. However, with my particular use-case, since I was dealing with a render loop... lol... Joel and Kevin are correct as far as the current solution goes (at least until the situation is clarified and/or resolved).
Thanks. Yeah, that's why I created this post/thread. The "direct poll" is working. I still don't know what Wait() is doing for those 10-15 ms and if I'm losing anything by "hogging" the cpu cycles and avoiding the "issue". There's probably more than some context-switch going on here. But that's up to the Roku gang to inform me about if I need to do something else; like if the box needs for me to call some other routine every once in a while. Linux will preempt the task at regular intervals anyway. If you're actually waiting for the user... rather than checking for possible input in a render loop... use Wait().
As to pseudo multi-tasking... I already do that (not timer triggered exactly but ... it's more than I want to get into here in this post).
Goto smoto. lol. I try to never use them except in rare cases like mentioned above. Funny tho.. on some processors everything gets compiled down to a goto anyway. Funny discussion. Not worried about it tho.
"RokuJoel" wrote:
<snip>
Freeing up 10-20ms by eliminating the wait() on the Roku2 platform, and even the 1-2 ms on the "Classic" Roku platform is significant from a game developer perspective where every millisecond counts.
<snip>
Thanks. Yeah, that's why I created this post/thread. The "direct poll" is working. I still don't know what Wait() is doing for those 10-15 ms and if I'm losing anything by "hogging" the cpu cycles and avoiding the "issue". There's probably more than some context-switch going on here. But that's up to the Roku gang to inform me about if I need to do something else; like if the box needs for me to call some other routine every once in a while. Linux will preempt the task at regular intervals anyway. If you're actually waiting for the user... rather than checking for possible input in a render loop... use Wait().
As to pseudo multi-tasking... I already do that (not timer triggered exactly but ... it's more than I want to get into here in this post).
Goto smoto. lol. I try to never use them except in rare cases like mentioned above. Funny tho.. on some processors everything gets compiled down to a goto anyway. Funny discussion. Not worried about it tho.