Efficient query timeouts in LuaJIT

  • From: Konstantin Osipov <kostja@xxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 30 Apr 2013 01:31:05 +0400

Hello,

We're desperately looking for ways to implement efficient lua_call()
and lua_pcall() timeouts. Yes, they are easily implementable with
a debug hook. However, running a hook on every instruction (or few
instructions) is not best for performance. Ideally, hooks which
check for timeouts need not have granularity lower than tens of
microseconds. Is there a way to do it with LuaJIT already?  Could
this be a sponsored feature?

Ideally, it would be great to integrate LuaJIT into our
virtual machine, so that it's possible to do a reduction (context
switch) while preserving the context of a running call.

Thanks, 

-- 
http://tarantool.org - an efficient, extensible in-memory data store

Other related posts: