lanes uses a threaded function like waitfor function

This commit is contained in:
2024-02-24 23:23:35 -05:00
parent b4c3708f50
commit 946217310f
2 changed files with 10 additions and 8 deletions
+4 -6
View File
@@ -48,14 +48,12 @@ local function INIT(__GlobalLinda, __SleepingLinda, __StatusLinda, __Console)
end
function THREAD.waitFor(name)
local function wait()
local multi, thread = require("multi"):init()
return multi.hold(function()
math.randomseed(os.time())
__SleepingLinda:receive(.001, "__non_existing_variable")
end
repeat
wait()
until __GlobalLinda:get(name)
return __GlobalLinda:get(name)
return __GlobalLinda:get(name)
end)
end
function THREAD.getCores()