[Stackless] Re: [Python-Dev] uthread strawman

Guido van Rossum guido at python.org
Thu Nov 9 16:30:03 CET 2000

> I imagined something like
> try:
> 	raise RestartableException, continuation.current_continuation()
> except RestartableException, ex:
> 	# correct the problem
> 	ex.saved_continuation()
> IOW, just put the continuation in the exception object.
> I don't think you can use generators/coroutines to simulate something
> like this

You can make the exception handler into a separate coroutine -- then
no reusable continuations are needed.  The coroutine can repair the
exception and resume the other.

--Guido van Rossum (home page: http://www.python.org/~guido/)
Stackless mailing list
Stackless at starship.python.net

More information about the Stackless mailing list