lua-users home
lua-l archive

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



Thanks, er... yes. :)

But you didn't indicate whether that would have chances of "getting through".. It's not a real big deal, just a slow-down when cancellable Lua Lanes are being used. Thanks for considering.


Luiz Henrique de Figueiredo kirjoitti 18.4.2007 kello 16:04:

The current API does not allow giving upvalues to the hook function
from C API. This would be required in multithreading scenarios where
several Lua states may be using the same lua_Hook function.

What you want is a closure not upvalues. Hook functions are not Lua
functions and so cannot have upvalues. So a better and equivalent API
would be to sethook to receive a void* just like reader functions.