[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: implementing "synchronous webservices" in Lua and C
- From: "David Burgess" <dburgess@...>
- Date: Tue, 26 Dec 2006 12:24:24 +1100
Read up on lua_resume() and lua_yield(). It works rather well with a few
minor constraints. If you want fully resumable C coroutines. See Mike
Palls COCO, which removes the constraints.
bert hubert wrote:
On Sun, Dec 24, 2006 at 05:40:09PM -0200, Roberto Ierusalimschy wrote:
> > 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.
I can actually do that from C? If so, that would be wonderful!
http://www.PowerDNS.com Open source, database driven DNS Software
http://netherlabs.nl Open and Closed source services