Found a pretty interesting edge case for schedule_interval when combined
with unschedule.

Scheduled functions cannot unschedule themselves.

Inside the method "call_scheduled_functions", each scheduled function is
popped off the heap before it is executed. When such a function tries to
calls unschedule for itself, it is not of the heap at this time. The
unschedule method looks at the heap to kill a scheduled function. It
doesn't find it. Then after it returns from the unschedule call,
call_scheduled_functions adds it back to the heap and moves onto the next.

It would be good if scheduled functions could unschedule themselves (I was
using it for animated text) but this email will have to suffice until I get
around to it

Luke

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to