[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Coroutine protected calls (the return of)
- From: Mike Pall <mikelu-0501@...>
- Date: Sat, 22 Jan 2005 18:53:58 +0100
Hi,
John Skaller wrote:
> There's also a solution for Python (Stackless Python),
> maybe it is worth looking at that (since it's also
> a bytecode interpreter).
Stackless Python does stack ripping for many core functions plus C stack
copying (a bit more portable than C stack switching, but slower). Ruby does
stack copying, too.
Alas, stack copying is problematic for Lua since we cannot assume an even
C stack base for the caller of lua_resume(). This could be solved by
hardwiring a scheduler into the core. But I do not think this is the way
to go for Lua.
Bye,
Mike