[Twisted-Python] Really Basic clarification on defers

John Aherne johnaherne at rocs.co.uk
Wed Aug 5 05:17:52 EDT 2009

Thanks for the reminder about deferreds.

I think the problem is more to do with knowing what role the reactor and
select perform.

I assume that sending and receiving data with sendline and linereceived are
not blocking.

So for our simple case we can ignore deferreds. They provide no benefit.
This is what our option 2 does.

John Aherne

On Tue, Aug 4, 2009 at 11:52 PM, Jarrod Roberson <jarrod at vertigrated.com>wrote:

> Deferreds don't do what you think they do.
> They don't do anything to make your code non-blocking.
> They only adhere to a contract that something will eventually be returned.
> The most common use of deferred's to make your code non-blocking is to use
> .deferToThread()
> or some other mechanism to make the long running code non-blocking, like
> spawning a process.
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090805/c6fbdb55/attachment.htm 

More information about the Twisted-Python mailing list