Freeze and Resume execution

Miki Tebeka miki.tebeka at zoran.com
Mon May 24 02:45:47 EDT 2004


Hello Peter,

> If you can't use threads, and you can't use Stackless, and if
> exceptions don't allow restarting, and if generators preserve
> only the current frame and not the entire stack (i.e. you can't
> hand the generator state up to a higher level function, then
> resume from there, which would be more like a coroutine I guess),
> then it looks like handling this with classes/state machines is
> your only option.
<sigh> I'm afraid that's what I'll do. Don't have time to play with
stackless now although continuations seems like the right solution.
BTW: I never had a good grasp on continuations in my Schemeing days.
Generators are *way* simpler to understand and use.

Bye.
--
-------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
http://www.cs.bgu.ac.il/~tebeka
The only difference between children and adults is the price of the toys.




More information about the Python-list mailing list