Re: Breaking infinite loops / stopping code execution from C
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Breaking infinite loops / stopping code execution from C
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2002年8月19日 20:38:28 -0300 (EST)
>I was just wondering if there is any way to immediately stop Lua execution,
>say, if some user scripts enter an infinite loop
You can set a hook and then a timer and a timer handler that calls lua_error
when the time has elapsed. In Lua 5.0 you'll be able to set "count" hooks
as well.
--lhf