[Twisted-Python] LoopingCall at a non-idling reactor

Glyph Lefkowitz glyph at twistedmatrix.com
Mon Jul 20 07:47:08 EDT 2009

On Mon, Jul 20, 2009 at 7:33 AM, Ilya Etingof <ilya at glas.net> wrote:

> Isn't this call priority policy appears somewhat rigid and obscure?
> Would it be clearer if user would be allowed to assign relative
> weights to his/her receiption and timer functions so that main loop
> could choose what to call in case of their competition for time slot?

As we have already said in this thread, yes, it would be nice if the call
priorities were adjustable and the queue of "work yet to do" could be easily
inspected and accounted for.  Somebody still has to actually *do* it though,
and there are over a thousand other issues just in Twisted which require our

If you would contribute a patch I'm sure someone would look at it.  I, for
one, would be very excited to get this feature in some form.

("relative weights" is kind of a silly way to do it though, because a
Twisted program is inevitably a collection of event handlers from disparate
codebases which don't know how the other codebases might interpret a
priority.  If a Twisted mail library thinks that 0.5 is a "low" priority and
0.8 is a "high" priority, it will interact poorly with a Twisted monitoring
library that thinks "20000" is a "low" priority and "1e10" is a "high"
priority.  Arbitrary numbers are never a good API.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090720/550b5454/attachment-0001.htm 

More information about the Twisted-Python mailing list