lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> What I'd love to be able to do is have getLine set something that makes
> lua_pcall return. Then, I'd go off doing various things, push the resulting
> line on the stack, and cause processing to continue.
> There might be other ways to achieve the same thing (run everything in Lua
> with coroutines, for example), but that doesn't fit my current architecture.

What do you mean coroutines do not fit your architecture? It seems to
me that what you are describing is exactly coroutines: getLine yields,
and then sometime later you push the result in line on the stack and
resume that coroutine.

-- Roberto