On Thu, Feb 10, 2011 at 5:14 AM, Mike Pall
<mikelu-1102@mike.de> wrote:
Shawn Fox wrote:
> How about adding the ability to get a function pointer back from luajit
> which would call a Lua function?
This is backwards. It's not an FFI for C, it's an FFI to be used
from Lua code. Callbacks will solve that particular problem (after
I implement them) and this is handled from Lua code.
--Mike
Is the callback feature assuming that the application loop is being driven by the Lua code? What if I have a loop in a C/C++ application where I need to call a function in LuaJIT 100 million times, getting some result back for each call? It isn't a situation where I can call Lua once and then have it deal with a large block of data, it must be driven externally by the C++ application.
So right now I have some code something like this: