About NewThread Func

Author: seb717-afkCreated May 14, 2026Updated May 14, 2026

Dear Yuin,

My name is Maxwell, and I am reaching out to you regarding you expertise in software development, particularly in gopher-lua project.

I’d like to pinpoint where my issues lies. Using GopherLua, I’ve observed that multiple new Lua_states can be created through the interface function NewThread by one Lua_state. However, it seems that these newly created Lua_states do not support concurrent operations by multiple Go coroutines. For example, when two Lua_states are created using NewThread func by one Lua_state, execute PCall operation on them simultaneously leads to map read/write conflict. Hope you can give me some guidance.

Best regards,

Maxwell, a fan of GopherLua