lua-users home
lua-l archive

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


Hi,

Is it possible to yield form a coroutine in a debug hook in LuaJIT 2? 
Currently, I get the error "attempt to yield across C-call boundary." 

I've seen some messages in the past that suggested that this was not possible.  

However, I think I was able to do this with LuaJIT 1.x.  

Here is some pseudo-code:

function debug_hook(event, line)
   coroutine.yield()
end


local func = loadstring(text)
local co = coroutine.create(func)
debug.sethook(co,  debug_hook, "l")
coroutine.resume(co)


Any ideas?

- Greg