more work and bug fixes

This commit is contained in:
Ryan Ward 2020-02-17 20:32:43 -05:00
parent 4384dbbaee
commit e1446c009d
2 changed files with 2 additions and 3 deletions

View File

@ -135,14 +135,13 @@ function multi:newSystemThreadedJobQueue(n)
end end
end end
end) end)
print("Cores: ",c.cores)
for i=1,c.cores do for i=1,c.cores do
multi:newSystemThread("JobQueue_"..jqc.."_worker_"..i,function(jqc) multi:newSystemThread("JobQueue_"..jqc.."_worker_"..i,function(jqc)
local multi, thread = require("multi"):init() local multi, thread = require("multi"):init()
require("love.timer")
local function atomic(channel) local function atomic(channel)
return channel:pop() return channel:pop()
end end
require("love.timer")
local clock = os.clock local clock = os.clock
local funcs = THREAD.createStaticTable("__JobQueue_"..jqc.."_table") local funcs = THREAD.createStaticTable("__JobQueue_"..jqc.."_table")
local queue = love.thread.getChannel("__JobQueue_"..jqc.."_queue") local queue = love.thread.getChannel("__JobQueue_"..jqc.."_queue")

View File

@ -54,7 +54,7 @@ function multi:newService(func) -- Priority managed threads
c:OnStarted(c) c:OnStarted(c)
time:Start() time:Start()
active = true active = true
end end
function c.getUpTime() function c.getUpTime()
return time:Get() return time:Get()
end end