Open RadiantUwU opened 3 weeks ago
Lua is not thread safe, and cannot be made thread safe in a reasonable way. Suggest closing this request.
Lua is not thread safe, and cannot be made thread safe in a reasonable way. Suggest closing this request.
Did you not read my... feature request...?
Is your feature request related to a problem? Please describe. Sometimes, one thread isn't enough, and you'd require more than one thread inside Lua. There is a huge limitation around how Lua's states are not thread-safe.
Describe the solution you'd like A clear and concise description of what you want to happen. I would like a
threading
library that allows the following:LuaAPI
state.ContextedLuaFunction
s, queues or blocks theLuaAPI
calling this function to run a function on the thread that created this.LuaAPI
state.lua_dump
andlua_load
, fails if upvalues are unable to be passed by value), C functions,ContextedLuaFunction
s, synchronization primitives, etc. Describe alternatives you've considered Using multipleLuaAPI
states and usingRefCounted
s for multi-threading.Additional context Add any other context or screenshots about the feature request here. I can open a pull request for this feature request if need be.