from luaLanes doc: Implementation and dependability of priorities varies by platform. Especially Linux kernel 2.6 is not supporting priorities in user mode. A lane can also change its own thread priority dynamically with lanes.set_thread_priority(). but working well in other kernels or sudo mode ----- Original Message ----- From: Konstantin Olkhovskiy To: luajit Sent: Wednesday, November 05, 2014 12:26 PM Subject: Re: luajit state CPU time limit 2014-11-05 14:02 GMT+03:00 Victor Bombi <sonoro@xxxxxxxxxxxxxx>: May be using luaLanes and lane priorities? I have not tested in linux but only on win32 I recall reading some rants about pthread priorities somewhere in Lanes docs. As of the original thread subject --- doing it at application level would hardly provide the required granularity. May be something along RLIMIT_CPU and handling a SIGXCPU signal might do the trick for you. -- Regards, Konstantin