← Back to team overview

nova team mailing list archive

Re: Why not python threads?

 

On Wed, Aug 04, 2010 at 07:50:01PM +0100, Ewan Mellor wrote:
>>> I feel like Nova is greatly complicated by the async code, and I'm
>>> starting to see some of the pain of Twisted: it seems that
>>> _everything_ needs to be async in the long run, because if something
>>> calls a function that is (or could be) async, it must itself be
>>> async.  So yields and @defer.inlineCallbacks start cropping up
>>> everywhere.
>> Just to be clear: defer.inlineCallbacks (and thus yields) are by no
>> means required to deal with deferreds. Before Nova, I had never used
>> it.
> All this aside, could you write a few simple examples of how we're
> supposed to use deferreds, inlineCallbacks, yields etc for now?  I
> thought that I was copying the idioms in use elsewhere, but I've ended
> up with code that is definitely blocking, even though I thought that
> it wouldn't be.

I'd be happy to. I've been out with a pretty hefty fever and I'm still
not anywhere near at a 100%, but I'll write something clever up first
thing Monday.

-- 
Soren Hansen
Ubuntu Developer
http://www.ubuntu.com/



References