lua-users home
lua-l archive

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


Remember that you can overload functions to be working the way you
want them to work. For example, you can change coroutine.create /
coroutine.yield and debug.sethook to allow you to yield within a
script properly. For example, the debug hook could call a certain
yield function that propagates the yield over all running coroutines.
A special resume function could then continue the execution in the
coroutine that was stopped by the debug hook. The debug.sethook
function could also be extended that it does not touch your "watchdog"
function but is called from the watchdog.

However, this means high costs - the debugger has a serious impact on
the performance.