V14.2.0 #17

Merged
rayaman merged 17 commits from v14.2.0 into master 2020-03-14 08:35:29 -04:00
2 changed files with 4 additions and 5 deletions
Showing only changes of commit aeb88e4bfc - Show all commits

View File

@ -1318,7 +1318,6 @@ function multi.initThreads(justThreads)
helper(i) helper(i)
end end
if threads[i] and not _ then if threads[i] and not _ then
print("TESTING",threads[i])
threads[i].OnError:Fire(threads[i],unpack(threads[i].TempRets)) threads[i].OnError:Fire(threads[i],unpack(threads[i].TempRets))
threads[i].isError = true threads[i].isError = true
end end
@ -1334,7 +1333,7 @@ function multi.initThreads(justThreads)
end end
elseif threads[i] and threads[i].task == "hold" then --GOHERE elseif threads[i] and threads[i].task == "hold" then --GOHERE
t0,t1,t2,t3,t4,t5,t6 = threads[i].func() t0,t1,t2,t3,t4,t5,t6 = threads[i].func()
if t0~=nil then if t0 then
if t0==multi.NIL then if t0==multi.NIL then
t0 = nil t0 = nil
end end
@ -1348,7 +1347,7 @@ function multi.initThreads(justThreads)
end end
elseif threads[i] and threads[i].task == "holdF" then elseif threads[i] and threads[i].task == "holdF" then
t0,t1,t2,t3,t4,t5,t6 = threads[i].func() t0,t1,t2,t3,t4,t5,t6 = threads[i].func()
if t0~=nil then if t0 then
threads[i].task = "" threads[i].task = ""
threads[i].__ready = true threads[i].__ready = true
elseif clock() - threads[i].time>=threads[i].sec then elseif clock() - threads[i].time>=threads[i].sec then
@ -1360,7 +1359,7 @@ function multi.initThreads(justThreads)
elseif threads[i] and threads[i].task == "holdW" then elseif threads[i] and threads[i].task == "holdW" then
threads[i].pos = threads[i].pos + 1 threads[i].pos = threads[i].pos + 1
t0,t1,t2,t3,t4,t5,t6 = threads[i].func() t0,t1,t2,t3,t4,t5,t6 = threads[i].func()
if t0~=nil then if t0 then
threads[i].task = "" threads[i].task = ""
threads[i].__ready = true threads[i].__ready = true
elseif threads[i].count==threads[i].pos then elseif threads[i].count==threads[i].pos then

View File

@ -3,7 +3,7 @@ multi, thread = require("multi"):init()
a=0 a=0
func = thread:newFunction(function() func = thread:newFunction(function()
return thread.holdFor(3,function() return thread.holdFor(3,function()
return (a==5) return a==5
end) end)
end,true) -- Tell the code to wait and then return end,true) -- Tell the code to wait and then return
print(func()) print(func())