[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Timing out LUA programs
- From: "paul_winwood" <paul_winwood@...>
- Date: Tue, 18 Jun 2002 15:13:10 -0000
--- In lua-l@y..., "davefowle" <davefowle@y...> wrote:
> Is there a safe way to shut down the LUA program after an arbitrary
> time interval?
I get the current time when I start the script running (lua_dofile,
lua_dobuffer, etc.). Then I add a line hook and check the elapsed
time. If the script runs for too long I call lua_error with an
appropriate message which interrupts execution of the script.
Paul.