On Sun, Jul 20, 2008 at 2:14 PM, Matthew Marshall
<[EMAIL PROTECTED]> wrote:
>
> simpsus_science wrote:
>> what is a showstopper for me is that rabbyts scheduler does not
>> support unscheduling in contrast to pyglets scheduler. pyglet has a
>> glitch to that because pyglets scheduler passes the dt time to the
>> called function, which is a problem is you schedule lambda dt: call()
>> because you cannot unschedule that (unless you store it). But thats
>> just a sidenote (I wrote abount it in another thread).
>>
>> Anyway, to keep my app sane I need to unschedule things from time to
>> time, so using rabbyts scheduler is not an option.
>
> You know, it's not all that hard to write your own scheduler that does
> things the way you want.  The one in Rabbyt is only 10 lines of code or so.
>

If think rather than writing you own scheduler, proxying the main one
is better (for some use cases).  pyglet has support for more complex
media event scheduling (schedule_interval_soft) to prevent trampling
the CPU, for example.  Also, by proxying per scene/level in the
context of the game you can keep references to things scheduled in the
context of a scene/level and prevent accidentally leaking references
by: 1) "noop"-ing on schedule requests after a scene is completed and
2) explicitly tracking/unscheduling functions scheduled in the scene.
Just my two cents on this.

-- 
\\\\\/\"/\\\\\\\\\\\
\\\\/ // //\/\\\\\\\
\\\/ \\// /\ \/\\\\
\\/ /\/ / /\/ /\ \\\
\/ / /\/ /\ /\\\ \\
/ /\\\ /\\\ \\\\\/\
\/\\\\\/\\\\\/\\\\\\
 d.p.s

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" 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/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to