-
Notifications
You must be signed in to change notification settings - Fork 0
lua_State Thread Accesses
Jess Balint edited this page May 9, 2013
·
2 revisions
How is lua_State accessed from different threads. Toward a model of handling it properly.
There are three main types of threads to worry about:
- Command loop: T_{Cmd}
- In general use, this will be blocked 99% of the time waiting on user input
- Event processor: T_{Evp}
- Calling event callback handlers, etc
- any Java thread: T_{Java}
- Short-lived access to push events to the queue
Here are some possible problems:
- Calling a method on T_{Cmd} that triggers an event causing some concurrent execution on T_{Evp}
- Maybe better locking on the queue?
- Any callback on T_{Java} sending an event to the queue causing some concurrent execution with T_{Evp}
- Maybe better locking on the queue?