MEDIUM: lua-thread: Apply lock only if the parent state is the main thread

The goal is to allow execution of one main lua state per thread.

This patch opens the way to addition of a per-thread dedicated lua state.
By passing the hlua we can figure the original state that's been used
and decide to lock or not.
1 file changed