Yielding across C boundaries

  • From: Lyn Headley <laheadle@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 1 Jan 2013 11:28:13 -0800

Hello all,

I have a program which would benefit from the ability to yield across
C boundaries. It has the following structure:

Main (C) calls-> Run (Lua) calls-> Library(C) calls-> callback (Lua).

I would like to yield from callback to Run, and then resume callback.
However when I try to do this I get an error message saying I should
not be trying to yield across a C boundary. I have been looking into
Coco but I can't figure out if it is compatible with Luajit 2.0. Are
there any strategies people recommend for doing this, or must I
restructure my program?

Thanks in advance,
Lyn

ps LuaJIT rocks!

Other related posts: