[Python-3000] Futures in Python 3000

Jim Jewett jimjjewett at gmail.com
Fri Apr 21 16:41:52 CEST 2006


On 4/21/06, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Andy Sy wrote:

> > Huh?  Futures are very different from continuations.  I still have a
> > hard time understanding continuations (and am no fan of them), but
> > futures seem to be a rather simple abstraction to comprehend.

> Isn't a future just a coroutine, or something equivalent?

Not in the references he supplied (or, at least, not in the Java one).

There, a Future is a proxy object, whose actual characteristics will
(or may) be filled in later.  If you need it, you wait for it, but if
you don't need it yet, it can be created in the background.

How to make this cleaner than the existing concrete implementations
(such as a twisted Deferred, or spawning a thread which puts a return
value in a known location) -- that is the part which hasn't been
worked out.

-jJ


More information about the Python-3000 mailing list