lua-users home
lua-l archive

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


Hi,

> How must I call lua-function from the C-side to be able to yield it?
> I tried call and pcall but the use of lua_yield cause a error: attempt
> to yield across metamethod/C-call boundary.

You can not do that, unfortunately. The error message is correct if 
perhaps a bit difficult to read: It means that

"you cannot yield across the boundary between Lua and C"

You can achieve roughly the effect you are looking for by running
the Lua function in its own thread, though.

HTH,
Rici