Continuations and threads (was Re: Iterators & generators)

Mike Fletcher mfletch at tpresence.com
Thu Feb 17 15:59:56 EST 2000


Not being a CS person, maybe I can confuse the issue :) ...

A continuation is a suspended execution context, you get to a point and say
"can't/won't finish this now, I'll store the state (frame) and let other
execution contexts call me when I should continue".  When you want to resume
the context, you "call" the continuation, which resumes running the
suspended execution context at the next line after the call to suspend.

If I'm reading things right, there are methods on continuations which allow
for updating variables while not running the context, so you can pass
information into the context while it is suspended.

But that's just from me skimming through Christian's article :) .  I've been
known to miss important CS concepts before ;) .

Enjoy,
Mike

-----Original Message-----
From: kc5tja at garnet.armored.net [mailto:kc5tja at garnet.armored.net]
Sent: Thursday, February 17, 2000 3:31 PM
To: python-list at python.org
Subject: Re: Continuations and threads (was Re: Iterators & generators)
...
OK, that's informative.  So much for the differences between threads and
continuations.  But I'm still left wondering just what the heck
continuations are.  :)
...




More information about the Python-list mailing list