Working on 16.0.0 #53
18
init.lua
18
init.lua
@ -994,7 +994,7 @@ function multi:newProcessor(name,nothread)
|
||||
if not nothread then -- Don't create a loop if we are triggering this manually
|
||||
c.process = self:newLoop(function()
|
||||
if Active then
|
||||
c:uManager()
|
||||
c:uManager(true)
|
||||
handler()
|
||||
end
|
||||
end)
|
||||
@ -1005,8 +1005,8 @@ function multi:newProcessor(name,nothread)
|
||||
else
|
||||
c.OnError = multi:newConnection()
|
||||
end
|
||||
c.OnError(multi.print)
|
||||
|
||||
c.OnError(multi.print)
|
||||
|
||||
function c:getThreads()
|
||||
return c.threads
|
||||
@ -1035,7 +1035,7 @@ function multi:newProcessor(name,nothread)
|
||||
|
||||
function c.run()
|
||||
if not Active then return end
|
||||
c:uManager()
|
||||
c:uManager(true)
|
||||
handler()
|
||||
return c
|
||||
end
|
||||
@ -1863,17 +1863,17 @@ function multi.init(settings, realsettings)
|
||||
return _G["$multi"].multi,_G["$multi"].thread
|
||||
end
|
||||
|
||||
function multi:uManager()
|
||||
function multi:uManager(proc)
|
||||
if self.Active then
|
||||
__CurrentProcess = self
|
||||
multi.OnPreLoad:Fire()
|
||||
self.uManager=self.uManagerRef
|
||||
multi.OnLoad:Fire()
|
||||
handler()
|
||||
if not proc then handler() end
|
||||
end
|
||||
end
|
||||
|
||||
function multi:uManagerRefP1()
|
||||
function multi:uManagerRefP1(proc)
|
||||
if self.Active then
|
||||
__CurrentProcess = self
|
||||
local Loop=self.Mainloop
|
||||
@ -1886,11 +1886,11 @@ function multi:uManagerRefP1()
|
||||
end
|
||||
end
|
||||
end
|
||||
handler()
|
||||
if not proc then handler() end
|
||||
end
|
||||
end
|
||||
|
||||
function multi:uManagerRef()
|
||||
function multi:uManagerRef(proc)
|
||||
if self.Active then
|
||||
__CurrentProcess = self
|
||||
local Loop=self.Mainloop
|
||||
@ -1899,7 +1899,7 @@ function multi:uManagerRef()
|
||||
__CurrentTask:Act()
|
||||
__CurrentProcess = self
|
||||
end
|
||||
handler()
|
||||
if not proc then handler() end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ function multi:newSystemThread(name,func,...)
|
||||
return c.name
|
||||
end
|
||||
thread:newThread(function()
|
||||
if name:find("TempSystemThread") then
|
||||
if name == "TempSystemThread" then
|
||||
local status_channel = love.thread.getChannel("__"..c.ID.."__MULTI__STATUS_CHANNEL__")
|
||||
thread.hold(function()
|
||||
-- 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
|
||||
end
|
||||
|
||||
function THREAD:newFunction(func)
|
||||
function THREAD:newFunction(func, holdme)
|
||||
return thread:newFunctionBase(function(...)
|
||||
return multi:newSystemThread("TempSystemThread"..THREAD_ID,func,...)
|
||||
end)()
|
||||
return multi:newSystemThread("TempSystemThread", func, ...)
|
||||
end, holdme)()
|
||||
end
|
||||
|
||||
THREAD.newSystemThread = multi.newSystemThread
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user