|
Tobias Markmann wrote:If I understood correctly, here's what the manual says of lua_yield():
lua_yield(L, 0);
printf("After yield\n");
return 0;
This function should only be called as the return _expression_
of a C function, as follows:
return lua_yield (L, nresults);
You can't insert a printf after the yield. If you have to, return normally and do a coroutine.yield on the Lua side (I used both methods and they work fine).
Enrico
In particular you can now:
- Yield from C functions and resume back to them.