[Twisted-Python] callLater(0) is A BIG LIE

exarkun at divmod.com exarkun at divmod.com
Mon Nov 1 14:06:05 MST 2004


On Mon, 1 Nov 2004 12:32:59 -0700, Jonathan Simms <slyphon at twistedmatrix.com> wrote:
>On Mon, Nov 01, 2004 at 12:47:52PM +0000, exarkun at divmod.com wrote:
> > On Mon, 1 Nov 2004 03:41:53 -0700, Jonathan Simms <slyphon at twistedmatrix.com> wrote:
> > >I'd like to offer some reflections on the reactor and facilitate some
> > > conversation on a subject that's been causing me much frustration:
> > > 
> > >     the twisted idiom, "callLater(0)"
> > > 
> > 
> > http://twistedmatrix.com/pipermail/twisted-python/2002-October/001943.html
> > 
> >   In particular,
> > 
> > http://twistedmatrix.com/pipermail/twisted-python/2002-October/001956.html
> > 
> >   Jp
> 
> Well great minds, etc. etc. ;)
> 
> The thing is, it doesn't seem as if this has decreased the use of
> callLater(0). Perhaps the answer would be to make a more concerted
> effort in not using it?

  I don't understand.  I was primarily referring to this:

> So, let's review, in order of importance.  This patch:
> 
>     * fixed no bugs
>     * added no features
>     * touched a lot of code
>     * destabilized a core Twisted API (in a fowards-compatible but not
>       backwards-compatible way) in that it implies callLater(0...) is
>       deprecated
>     * made a very basic and frequently-used idiom slightly less efficient
> 
> Most of all, it provides two ways of doing the exact same thing, and I
> generally think that the TIMTOWTDI philosophy is awful.
> -- 
>  |    <`'>    |  Glyph Lefkowitz: Travelling Sorcerer  |
>  |   < _/ >   |  Lead Developer,  the Twisted project  |
>  |  < ___/ >  |      http://www.twistedmatrix.com      |

  To paraphrase, callLater(0 is good, replacing it with something else for no reason other than to replace it with something else is pointless.

  Jp




More information about the Twisted-Python mailing list