[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Infinite loops / execution time / hooks
- From: Celvin <read.beyond.data@...>
- Date: Wed, 29 Dec 2004 17:29:07 +0100
Hi,
after a while I recently started to use Lua again, unfortunately, I
found my old problem to persist, although with Lua 5 introducing count
hooks, there seems to be a possible solution in sight...
While I could restrict execution using count hooks and a timer - based
approach, as Luiz suggested, I recently read about hooks and yielding
leading to possible problems that might occur when yielding from a hook.
Right now, I'm wondering if these problems can entirely be avoided if
none of my hook implemenations (in C) calls lua_yield() ?
Additionally, as I found that others encountered similar problems, I
guess it would be really appreciated if someone with deeper insights
into the Lua VM could propose a possible integrated solution -
currently I'm thinking of functions like lua_stop_execution(),
or even a set of pause / resume functions that allow a finer control
for a given lua state pointer...
Comments from the Lua team concerning a possible integrated
solution are especially welcome, of course ;)
--
Regards,
Celvin
read.beyond.data@gmx.net