MultiLua
by Nothing Mod
MultiLua a ScrapMechanic LuaMultithreading Proof of Concept This library is not meant to be used for production mods yet due to being unfinished/a proof of concept Full Documentation Available on Github ------------------------------------ Big Array Example: local data , data) --Wait however many ticks since we are limited to sm callbacks env:pokeThread() --Poke a random thread to recieve data from shared thread memory --Wait a tick or 2 for results to update local totalSum = 0 for thread, result in pairs(env:getThreadResults()) do totalSum = totalSum+result end ------------------------------------ How to use 1. Add the lib as a dependency in your custom game's description.json { "fileId" : 3702217107, "localId" : "b1442a40-8a35-4b8b-a840-2bf1a3f245e0", "name" : "MultiLua" } 2. Dofile the lib in your lua script dofile "$CONTENT_b1442a40-8a35-4b8b-a840-2bf1a3f245e0/Scripts/Multi.lua" 3. Enjoy! ------------------------------------ Have fun :)
Comments
0 total- No comments yet. Be first.
