Started work on the debugManager

This commit is contained in:
2023-06-30 16:14:21 -04:00
parent d36204c87f
commit b2569118a2
5 changed files with 115 additions and 53 deletions
-28
View File
@@ -329,33 +329,5 @@ function multi:newSystemThreadedProcessor(cores)
return false
end
c.getLoad = thread:newFunction(function(self, tp)
local loads = {}
local func
if tp then
func = "STP_GetThreadCount"
else
func = "STP_GetTaskCount"
end
for i,v in pairs(self.proc_list) do
local conn
local jid = self:pushJob(v, func)
conn = self.jobqueue.OnJobCompleted(function(id, data)
if id == jid then
table.insert(loads, {v, data})
multi:newTask(function()
self.jobqueue.OnJobCompleted:Unconnect(conn)
end)
end
end)
end
thread.hold(function() return #loads == c.cores end)
return loads
end, true)
return c
end