Fixed typo in pseudoManager

This commit is contained in:
Ryan Ward 2023-05-07 00:19:34 -04:00
parent 9f3b663fa2
commit cfa4c0f0b6
3 changed files with 6 additions and 4 deletions

View File

@ -1442,7 +1442,7 @@ function thread:newProcessor(name)
return Active
end
function proc:newThread(name, func,...)
function proc:newThread(name, func, ...)
return thread.newThread(thread_proc, name, func, ...)
end
@ -2149,6 +2149,7 @@ function multi:getLoad()
end
function multi:setPriority(s)
if not self.IsAnActor or self.Type == multi.PROCESS then return end
if type(s)=="number" then
self.Priority=s
elseif type(s)=='string' then

View File

@ -32,7 +32,7 @@ if multi.integration then
}
end
local GLOBAL, THREAD = require("multi.integration.pesudoManager.threads").init(thread)
local GLOBAL, THREAD = require("multi.integration.pseudoManager.threads").init(thread)
function multi:canSystemThread() -- We are emulating system threading
return true

View File

@ -1,4 +1,4 @@
package.path = "../?/init.lua;../?.lua;"..package.path
--package.path = "../?/init.lua;../?.lua;"..package.path
multi, thread = require("multi"):init{print=true,warn=true,error=false}--{priority=true}
proc = multi:newProcessor("Thread Test",true)
local LANES, LOVE, PSEUDO = 1, 2, 3
@ -34,13 +34,14 @@ THREAD.setENV({
multi.error(s .. " Expected: '".. expected .."' Actual: '".. actual .."'")
end
end
})
},"Test_ENV")
multi:newThread("Scheduler Thread",function()
queue = multi:newSystemThreadedQueue("Test_Queue"):init()
th1 = multi:newSystemThread("Test_Thread_1", function(a,b,c,d,e,f)
queue = THREAD.waitFor("Test_Queue"):init()
THREAD.exposeENV("Test_ENV")
multi_assert("Test_Thread_1", THREAD.getName(), "Thread name does not match!")
multi_assert("Passing some args", a, "First argument is not as expected 'Passing some args'")
multi_assert(true, e, "Argument e is not true!")