[Twisted-Python] Sequential use of asynchronous calls

Maarten ter Huurne maarten at treewalker.org
Sat May 26 11:57:48 MDT 2007


On Saturday 26 May 2007, glyph at divmod.com wrote:
> On 05:20 pm, gabor.bernath at gmail.com wrote:
> >inlineCallbacks are similar to what you are doing. very cool stuff.
>
> Unless I misunderstand, inlineCallbacks isn't just similar, it's exactly
> the same :).  Is there any difference?

inlineCallbacks is better, because it allows you to pass a result to the 
callback of the "outer" Deferred using "returnValue". My implementation just 
passed None.

Other than that, it seems to be the same thing indeed.

> This highlights to me that we need someone to write about more of the
> hidden corners of Twisted; there are a lot of features included that are
> not well-known, and it's not clear that anyone would look for them (or
> if they did, where).

In this particular case, it may be useful to add a section to the Deferred 
Reference.

Bye,
		Maarten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20070526/47cea423/attachment.sig>


More information about the Twisted-Python mailing list