nova team mailing list archive
Mailing list archive
Re: Why not python threads?
On Wed, Aug 04, 2010 at 12:41:53PM +0100, Soren Hansen wrote:
> On Tue, Aug 03, 2010 at 06:30:14PM -0700, Justin Santa Barbara 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.