[Twisted-Python] Twisted vs jQuery Deferreds (was Re: RPC design questions)

Tobias Oberstein tobias.oberstein at tavendo.de
Wed Aug 24 18:52:48 EDT 2011


Ok. This is most unpleasant. In particular since my options then are:

1) write my own, sane (Twisted like, which I think is the sane way) JS deferred, not use jQuery/CommonJS (which everyone else does)
2) open the door for users running into issues when they do both Twisted & JS/jQuery and don't understand the subtle difference

bad.

of course not a Twisted mailing list topic anymore .. I'll go to jQuery list.

Thanks!
Tobias


On 25.08.11 00:36, "Allen Short" <washort at twistedmatrix.com> wrote:

No, this is something jQuery and CommonJS got wrong; callbacks don't chain in their implementation.

Firing a jQuery promise invokes each callback in order with the same argument. Firing a Deferred in Twisted invokes the first callback then passes its return value as the arg to the next callback, and so forth.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20110824/534264cb/attachment.htm 


More information about the Twisted-Python mailing list