lua-users home
lua-l archive

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


Hi List,

I mentioned in a previous post [1] the idea of incrementing the
bytecode count using an API function provided by Lua (e.g.
lua_incbc(lua_State *L)). This would allow libraries that could
potentially execute for long times (like the string pattern matching
functions) to periodically increment a byte count that would allow a
debug hook to run and possibly stop execution. This would be
especially nice in Lua 5.2 if Mike Pall's coroutine patch is applied
so we can enforce run times (using lua_yield) in our threads.

[1] http://lua-users.org/lists/lua-l/2009-02/msg00501.html

Thoughts?

-- 
-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant