[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: yielding inside a function
- From: RLake@...
- Date: Mon, 17 Nov 2003 10:36:18 -0500
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