lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Season's Greetings!

I am incorporating Lua in an application, and I've run into some design issues that I'm sure many
of you have dealt with before.  Your insights would be greatly appreciated.

My biggest problem is that the user may close the host app while a script is executing.  How
should I terminate the script?  Is there a hook that will let me tell Lua to stop interpreting
code ASAP and return, much like it does when it encounters a runtime error?  An alterative I've
considered is a global 'running' flag which scripts must check periodically to see if they should
abort processing (i.e. if not running then return end, or while running do somework() end).

To complicate matters, I'm using Lua Threads, so a script may have spawned an arbitrary number of
child threads.

I'm using Lua 4.1 work 3 with Lua Threads.

Thanks,
Eric


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com