The only way I know, is to make in C side a queue of events, which is then read (polled if you may) at a known place in the Lua code.
If you need code, take contact.
Tim Michals kirjoitti 30.3.2007 kello 6:18: I have a simple script running using coroutines one of the coroutines calls a mapped C function that setups a timer with a call back. Since this timer is long running, the fucntion returns then coroutine is put to suspend, and then the script goes off and processes something else, now the timer fires via a OS thread, how can the timer post back to Lua to wake up the coroutine?
Your friends are close to you. Keep them that way. |