lua-users home
lua-l archive

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



On 11-Oct-06, at 11:14 PM, jason bright wrote:

I haven't tried, but first thing that comes to mind is to inject an error when inside the hook function, but thats an ugly solution.

That would be the way to do it. Why is that ugly? pcall is supposed to catch calls to error() (or lua_error(), inside a C function.)

Starting a thread and killing it is going to leak memory. Throwing an error() to pcall() is much cleaner.