[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Nonblocking script execution
- From: Eike Decker <zet23t@...>
- Date: Tue, 24 Feb 2009 16:27:45 +0100
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.