We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
创建luathread时我们希望不影响到主luastate希望增加隔离功能 示例代码如下: luaState * sL = lua_newthread(L); lua_pushthread(sL); int luaRef = luaL_ref(sL, LUA_REGISTRYINDEX);
lua_newtable(sL); lua_pushvalue(sL, -1); lua_setmetatable(sL, -2); lua_getglobal(sL,, "_G"); lua_setfield(sL, -2, "__index"); lua_pushvalue(sL, -1); lua_setglobal(sL, nName); lua_setupvalue(sL, -2, 1);
The text was updated successfully, but these errors were encountered:
你可以在你newthread时调用这个代码啊? 我看不出有任何必要需要在库中增加他
Sorry, something went wrong.
好吧,这个随意吧,也许你平时没用到吧, 我只是觉得这是lua最重要核心功能, 比如插件的装载和卸载,界面的打开和关闭, 副本的打开和关闭,等等好多, 虽然我已经封装了我自己想要的东西 写上面那段代码毕竟花了我好几天时间专门研究lua这一小段功能, 可能很多人还要花很多时间再重写这段代码吧, 我只是想你已经做了那么多,为什么不加上呢?
不过谢谢你啊,最开始看到这个库,我真的很开心
好的,请不要关闭这个issue,这样如果有人看到,那么刚好可以拿来使用
No branches or pull requests
创建luathread时我们希望不影响到主luastate希望增加隔离功能
示例代码如下:
luaState * sL = lua_newthread(L);
lua_pushthread(sL);
int luaRef = luaL_ref(sL, LUA_REGISTRYINDEX);
The text was updated successfully, but these errors were encountered: