[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: do "N" bytecode
- From: "Marc O'Morain" <marc.omorain+lua@...>
- Date: Wed, 15 Dec 2010 01:51:40 +0000
You need to use a Lua coroutine, and in the hook call coroutine.yield().
Create a coroutine, and set it's debug hook to be a count type, with a count of 100. Now your hook function will be called every 100 bytecodes. You just need to call coroutine.yield() in your hook.
On Tue, Dec 14, 2010 at 12:27 PM, Pastyl <firstname.lastname@example.org>
Jonathan Castello pisze:
Is any working examples?
>> I have a question. Is there any way to start, stop and then start it again?
>> I need to compile a program in lua, then execute 100 the user to do
>> something in C, and again to perform 100 instructions from lua, and
>> again to do something in C program in lua is free.
>> Something like lua_do100bytecode (L)