lua-users home
lua-l archive

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

The only troubles (challenges) I've found with callbacks come from asyncronic callbacks, which are called from threads other than the one Lua lives in. You might check this, first.

The case I have in mind was SDL music playback, where I needed to craft a simple inter-thread-message-passing queue to provide the callbacks to the Lua side.


CHU Run-min kirjoitti 27.12.2005 kello 11.58:

There is a C function named Foo in host program.
There is a Lua function named bar in a script.
There is a lua_CFunction named Goo.

Foo calls bar, bar maybe calls Goo, but Goo calls Foo, is it OK?

(Suppose the Lua function bar is a window message handling center.)