lua-users home
lua-l archive

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


David Burgess skrev:
[...]
> Restating my problem :
I am executing user code in Lua threads and I seek a low
overhead means  of terminating user tasks that exceed
a predefined time limit.

I have an app running in a multithreaded environment (but each thread
has its own lua instance, communicating through a database) and use sleep and usleep quite a bit to wait for other tasks to complete their work. So I put in a timeout check in the exposed function.

This won't do though, if you need to abort a script running wild with no calls to such a function.