[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Manual timeslicing the VM.
- From: Rici Lake <lua@...>
- Date: Fri, 5 Aug 2005 07:36:58 -0500
On 5-Aug-05, at 5:19 AM, Mike Pall wrote:
Alas, there is no (easy) way to differentiate a yield from a hook
with a yield from the Lua function itself. So you have to decide
for one feature or the other.
Surely that is what return values are for :)
Oh, and BTW: do not mix coroutine.resume() (the Lua function)
with yielding from the line or count hook. It rips apart the
stack frame of the running Lua function. You really have to use
lua_resume() from C and carefully avoid touching the coroutine
What problem precisely are you referring to here? Is this the issue
that hooks don't have call frames? Personally, I think that's a bug.