On 4 November 2014 22:47, Javier Guerra Giraldez <javier@xxxxxxxxxxx> wrote: > On Tue, Nov 4, 2014 at 2:34 PM, Александр Киранов <xhaskx@xxxxxxxxx> > wrote: > > So, when some lua_State consumed too many CPU I need to know it and > handle > > it on LUA or on C level. > > > better handle it at the OS level. Linux includes many different tools > to limit resources. LXC and cgroups spring to mind. I would start > here: https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt > > But you will have to decompose your application into some processes to get proper control granularity. Regards Alexander