[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Yielding
- From: Brian Swetland <swetland@...>
- Date: Mon, 23 Dec 2002 15:21:59 -0800
[Roberto Ierusalimschy <firstname.lastname@example.org>]
> > Is it possible to yield from the opcode count hook under Lua 5.0 beta?
> Yes. Just finish your hook with
> lua_yield(L, 0);
And this will never cause the "attempt to yield across metamethod/C-call
boundary" error (that can happen in lua_yield() if L->nCcalls > 0?
It seems like there are some conditions that this might not work under
(but perhaps I misunderstand the source). In particular, if the hook
happens while a metamethod is running or inside of lua code called
from c code from lua code, will it happily yield or will there be an