Debugging what is going on...

This commit is contained in:
2023-06-19 00:24:07 -04:00
parent 1b3e3303e9
commit c80f44c68e
5 changed files with 21 additions and 15 deletions
+4 -4
View File
@@ -174,7 +174,7 @@ function multi:newSystemThreadedJobQueue(n)
queueReturn:push{jid, funcs[name](multi.unpack(args)), queue}
end).OnError(multi.error)
end
end).OnError(print)
end).OnError(multi.error)
thread:newThread("DoAllHandler",function()
while true do
local dat = thread.hold(function()
@@ -190,7 +190,7 @@ function multi:newSystemThreadedJobQueue(n)
end
end
end
end).OnError(print)
end).OnError(multi.error)
thread:newThread("IdleHandler",function()
while true do
thread.hold(function()
@@ -198,9 +198,9 @@ function multi:newSystemThreadedJobQueue(n)
end)
THREAD.sleep(.01)
end
end).OnError(print)
end).OnError(multi.error)
multi:mainloop()
end,i).OnError(print)
end,i).OnError(multi.error)
end
return c
end
+1 -1
View File
@@ -177,7 +177,7 @@ function multi.InitSystemThreadErrorHandler()
end
end
end
end).OnError(print)
end).OnError(multi.error)
end
multi.print("Integrated Lanes Threading!")
+2 -2
View File
@@ -271,7 +271,7 @@ function multi:newSystemThreadedConnection(name)
-- This shouldn't be the case
end
end
end).OnError(print)
end).OnError(multi.error)
return self
end
@@ -346,7 +346,7 @@ function multi:newSystemThreadedConnection(name)
c.proxy_conn:Fire(multi.unpack(item[2]))
end
end
end).OnError(print)
end).OnError(multi.error)
--- ^^^ This will only exist in the init thread
THREAD.package(name,c)
+6 -3
View File
@@ -125,7 +125,7 @@ function multi:newProxy(list)
self.recv:push(ret)
end
end
end).OnError(print)
end).OnError(multi.error)
return self
else
local multi, thread = require("multi"):init()
@@ -300,10 +300,13 @@ function multi:newSystemThreadedProcessor(cores)
return tjq:pop()
end)
if dat then
for i,v in pairs(dat) do
print(i,v)
end
th = thread:newThread("JQ-TargetThread",function()
local name = table.remove(dat, 1)
local jid = table.remove(dat, 1)
local func = table.remove(dat, 1)
local func = _G[name]
local args = table.remove(dat, 1)
th.OnError(function(self,err)
-- We want to pass this to the other calling thread incase
@@ -313,7 +316,7 @@ function multi:newSystemThreadedProcessor(cores)
end)
end
end
end).OnError(print)
end).OnError(multi.error)
end)
c.jobqueue:registerFunction("STP_GetThreadCount",function()