[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: coroutine.yield from debug hook in LuaJIT 2
- From: Greg <tghill@...>
- Date: Sat, 11 Jun 2011 13:11:03 +0000 (UTC)
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)
local func = loadstring(text)
local co = coroutine.create(func)
debug.sethook(co, debug_hook, "l")