Working on 16.0.0 #53

Merged
rayaman merged 120 commits from v16.0.0 into master 2024-02-25 00:00:51 -05:00
3 changed files with 22 additions and 22 deletions
Showing only changes of commit 6ed5555706 - Show all commits

View File

@ -994,7 +994,7 @@ function multi:newProcessor(name,nothread)
if not nothread then -- Don't create a loop if we are triggering this manually if not nothread then -- Don't create a loop if we are triggering this manually
c.process = self:newLoop(function() c.process = self:newLoop(function()
if Active then if Active then
c:uManager() c:uManager(true)
handler() handler()
end end
end) end)
@ -1005,8 +1005,8 @@ function multi:newProcessor(name,nothread)
else else
c.OnError = multi:newConnection() c.OnError = multi:newConnection()
end end
c.OnError(multi.print)
c.OnError(multi.print)
function c:getThreads() function c:getThreads()
return c.threads return c.threads
@ -1035,7 +1035,7 @@ function multi:newProcessor(name,nothread)
function c.run() function c.run()
if not Active then return end if not Active then return end
c:uManager() c:uManager(true)
handler() handler()
return c return c
end end
@ -1863,17 +1863,17 @@ function multi.init(settings, realsettings)
return _G["$multi"].multi,_G["$multi"].thread return _G["$multi"].multi,_G["$multi"].thread
end end
function multi:uManager() function multi:uManager(proc)
if self.Active then if self.Active then
__CurrentProcess = self __CurrentProcess = self
multi.OnPreLoad:Fire() multi.OnPreLoad:Fire()
self.uManager=self.uManagerRef self.uManager=self.uManagerRef
multi.OnLoad:Fire() multi.OnLoad:Fire()
handler() if not proc then handler() end
end end
end end
function multi:uManagerRefP1() function multi:uManagerRefP1(proc)
if self.Active then if self.Active then
__CurrentProcess = self __CurrentProcess = self
local Loop=self.Mainloop local Loop=self.Mainloop
@ -1886,11 +1886,11 @@ function multi:uManagerRefP1()
end end
end end
end end
handler() if not proc then handler() end
end end
end end
function multi:uManagerRef() function multi:uManagerRef(proc)
if self.Active then if self.Active then
__CurrentProcess = self __CurrentProcess = self
local Loop=self.Mainloop local Loop=self.Mainloop
@ -1899,7 +1899,7 @@ function multi:uManagerRef()
__CurrentTask:Act() __CurrentTask:Act()
__CurrentProcess = self __CurrentProcess = self
end end
handler() if not proc then handler() end
end end
end end

View File

@ -72,7 +72,7 @@ function multi:newSystemThread(name,func,...)
return c.name return c.name
end end
thread:newThread(function() thread:newThread(function()
if name:find("TempSystemThread") then if name == "TempSystemThread" then
local status_channel = love.thread.getChannel("__"..c.ID.."__MULTI__STATUS_CHANNEL__") local status_channel = love.thread.getChannel("__"..c.ID.."__MULTI__STATUS_CHANNEL__")
thread.hold(function() thread.hold(function()
-- While the thread is running we might as well do something in the loop -- While the thread is running we might as well do something in the loop
@ -101,10 +101,10 @@ function multi:newSystemThread(name,func,...)
return c return c
end end
function THREAD:newFunction(func) function THREAD:newFunction(func, holdme)
return thread:newFunctionBase(function(...) return thread:newFunctionBase(function(...)
return multi:newSystemThread("TempSystemThread"..THREAD_ID,func,...) return multi:newSystemThread("TempSystemThread", func, ...)
end)() end, holdme)()
end end
THREAD.newSystemThread = multi.newSystemThread THREAD.newSystemThread = multi.newSystemThread