lua-users home
lua-l archive

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

On Fri, Jul 12, 2013 at 11:22 PM, Andrew Starks <> wrote:


In looking at the lua source, it seemed like any table access would require locking (lua_lock). Also, is the stack filo? 

I've avoided lua_lock  questions so far by not doing any lua operations except in the main thread.  Any other threads solely do systems operations in C, and any data structures exchanged between the threads are marshalled to/from lua so that I'm not accessing the lua state except in the main thread. The stack is lifo (which is simpler to implement lock free)- it doesn't matter what order the events are processed in since they are all independent and asynchronous anyway.