[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re:How to exchange the values of a specific variable (e.g: maybe a table) between Lua_States?
- From: Suote127 <tswuyin_st127@...>
- Date: Fri, 23 Apr 2021 20:07:45 +0800 (CST)
Let me add some points:
For Lua functions,lua_dump() and lua_load() are supposed to work.lua_dump() can convert a function to bytecode and then you can pass it to another lua_State,then load it by lua_load().
AFAIK,there is probably no a perfect solution.Many multi-thread libraries that implemented by multiple lua_States try to make the users feel that all threads are running in a lua_State,however,this goal has not been achieved yet.