[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: embedded lua in web based REPL
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 23 Mar 2010 10:08:41 -0300
> I've tried a few things along these lines but without much luck. I
> think the main problem is just that I don't have a good understanding
> of how yields and resumes operate.
That really makes things difficult...
> Hence, I figure that yield/resume do something I'm not expecting, or
> don't understand. I'd appreciate a simple example of how to use
> lua_yield in a C hook function, if at all possible!
return lua_yield(L, 0);
That is it.
As I told you, C hooks are not regular lua_Cfunctions. In particular, you
cannot use lua_*k functions inside them. This case of 'lua_yield' is
handled separately in the VM, as a special case.
-- Roberto
- References:
- Re: embedded lua in web based REPL, Sam Roberts
- Re: embedded lua in web based REPL, Jonathan Castello
- Re: embedded lua in web based REPL, Roberto Ierusalimschy
- Re: embedded lua in web based REPL, Jonathan Castello
- Re: embedded lua in web based REPL, Roberto Ierusalimschy
- Re: embedded lua in web based REPL, Jonathan Castello
- Re: embedded lua in web based REPL, Roberto Ierusalimschy
- Re: embedded lua in web based REPL, Jonathan Castello
- Re: embedded lua in web based REPL, Roberto Ierusalimschy
- Re: embedded lua in web based REPL, Jonathan Castello