lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Ok, thanks for the clarification.
A couple more questions, if you remember:

1) How do you prevent the debugger from debugging itself (or you don't) ?
2)  How do you coroutine.yield to the correct coroutine.resume (the
one inside the loop) ? Your first coroutine.resume is outside the
"loop", when you set the line hook. How come the next coroutine.yield
doesn't get you back here (hence exiting the program) ?

Thanks again,

Hugo Schmitt (Porto Alegre, Brasil)

On Thu, Aug 21, 2008 at 5:10 PM, Fabio Mascarenhas <mascarenhas@acm.org> wrote:
>
> Hi,
>
> Convenience. With coroutines I could write the engine's listener loop (that answers commands from the controller) as an actual loop. It could be implemented as a function that gets called by the debug hook, but IMHO it would make the code more complex.
>
> --
> Fabio Mascarenhas
>
> On Wed, Aug 20, 2008 at 11:06 PM, Hugo Schmitt <hugows@gmail.com> wrote:
>>
>> (I tried kepler project list, but maybe this one is more appropriate)
>>
>> Hi folks.
>> I don't know if remdebug's author reads this list, but I'm trying here first.
>>
>> I looked at remdebug's source (engine.lua on this case) but could not find out why are coroutines needed for this implementation.
>> Anyone cares to explain?
>>
>> Thanks a lot,
>> hugo