[Python-Dev] uthread strawman
Guido van Rossum
Thu, 09 Nov 2000 10:30:03 -0500
> I imagined something like
> raise RestartableException, continuation.current_continuation()
> except RestartableException, ex:
> # correct the problem
> 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/)