[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: implementing "synchronous webservices" in Lua and C
- From: roberto@... (Roberto Ierusalimschy)
- Date: Sun, 24 Dec 2006 17:40:09 -0200
> 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