Alex wrote: > (Unless maybe you generate the main thread FFI callback on the VM created > for the thread, so that the states remain separated. But I'm not sure how > you would get a pointer to that on the parent thread, since there is no C > API for the FFI. Maybe lightuserdata functions will work on FFI pointers?) //www.freelists.org/post/luajit/How-to-create-another-lua-State-in-pthread,8 [Note: the original code is suboptimal, but it shows the basic idea.] --Mike