Thread locals in Lua

后端 未结 2 1381
夕颜
夕颜 2020-12-20 01:44

In my application a Lua script can subscribe to certain events from a Client. It is also possible to have one script subscribe to multiple Clients. Currently I am setting th

2条回答
  •  既然无缘
    2020-12-20 02:36

    Lua threads are child states from a single mother state. All global variables are shared by these Lua threads.

    Separate Lua states have separate globals.

提交回复
热议问题