[Twisted-Python] gtk2reactor: scheduling work in the immediate future without throttling gtk

Itamar Turner-Trauring itamar at itamarst.org
Sun Apr 18 09:19:38 EDT 2010


On Sun, 2010-04-18 at 13:11 +0200, Thomas Vander Stichele wrote:
>  - if I do it with callLater(0, ...), again these calls get executed
> ASAP and throttle the main loop

If this is actually affecting your UI this may mean the batch size you
are processing in each call is too big. E.g. if it takes 50ms per call,
you're not going to get more than 20FPS if you run one call per
iteration. 

Something like twisted.internet.task.coiterate might help, but you still
need to make sure each chunk (or rather, size of chunk*num parallel
processes) is sufficiently small.




More information about the Twisted-Python mailing list