[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Turing-incomplete Lua?
- From: "Ashwin Hirschi" <deery@...>
- Date: Tue, 07 Dec 2004 19:19:52 +0100
Why not set the hook before you start the script (from the same thread thatthe script runs in, I mean)?
Because it will probably slow down the script, even if the hook only
checks a flag. Plus you'll have to store the flag somewhere that the
main application can raise it when the user presses 'stop' or something.
So, I think it's easier simply to set the hook at the momemnt the thread
needs to be interrupted.
You're right about the possible slow down, of course. I didn't know it was safe to call lua_sethook from another (OS) thread while a script was running. This is not the same situation as in the vanilla Lua interpreter, or is it?
no signature is a signature.