[Twisted-Python] On problems with inlineCallbacks (was Re: Is there pb documentation somewhere?)
Maxim Lacrima
lacrima.maxim at gmail.com
Tue Aug 12 01:44:42 MDT 2014
Hi,
> Of course the problems that we describe with inlineCallbacks are the
> > exact same problems that you will have with Tulip-style coroutines,
> > and in fact in one of the conversations that was averaged out to
> > produce the above composite, my interlocutor specifically mentioned
> > that they'd already had the kind of bug that explicit-yield coroutines
> > can sometimes encourage (thoughtlessly putting in too many 'yield's
> > and not considering their consequences) and were wondering how Twisted
> > dealt with that sort of thing.
In my understanding Tulip-style coroutines have one advantage. You can use
'yield from ...', which says something like: "don't go through event loop,
but delegate to another coroutine directly". I think this is faster and can
make implementation of event loop simpler. But I can be wrong. Please,
correct me.
Also, I think discussion of advantages/disadvantages of inlineCallbacks had
started before invention of 'yield from ...'. But I can't say much about
it, because I started using twisted not so long ago. So I am also
interested in this discussion.
So what are the exact same problems that both inineCallbacks and
Tulip-style coroutines have?
--
Regards,
Maxim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20140812/253d0892/attachment-0002.html>
More information about the Twisted-Python
mailing list