Fixed typo in pseudoManager
This commit is contained in:
parent
9f3b663fa2
commit
cfa4c0f0b6
3
init.lua
3
init.lua
@ -1442,7 +1442,7 @@ function thread:newProcessor(name)
|
|||||||
return Active
|
return Active
|
||||||
end
|
end
|
||||||
|
|
||||||
function proc:newThread(name, func,...)
|
function proc:newThread(name, func, ...)
|
||||||
return thread.newThread(thread_proc, name, func, ...)
|
return thread.newThread(thread_proc, name, func, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -2149,6 +2149,7 @@ function multi:getLoad()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function multi:setPriority(s)
|
function multi:setPriority(s)
|
||||||
|
if not self.IsAnActor or self.Type == multi.PROCESS then return end
|
||||||
if type(s)=="number" then
|
if type(s)=="number" then
|
||||||
self.Priority=s
|
self.Priority=s
|
||||||
elseif type(s)=='string' then
|
elseif type(s)=='string' then
|
||||||
|
|||||||
@ -32,7 +32,7 @@ if multi.integration then
|
|||||||
}
|
}
|
||||||
end
|
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
|
function multi:canSystemThread() -- We are emulating system threading
|
||||||
return true
|
return true
|
||||||
|
|||||||
@ -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}
|
multi, thread = require("multi"):init{print=true,warn=true,error=false}--{priority=true}
|
||||||
proc = multi:newProcessor("Thread Test",true)
|
proc = multi:newProcessor("Thread Test",true)
|
||||||
local LANES, LOVE, PSEUDO = 1, 2, 3
|
local LANES, LOVE, PSEUDO = 1, 2, 3
|
||||||
@ -34,13 +34,14 @@ THREAD.setENV({
|
|||||||
multi.error(s .. " Expected: '".. expected .."' Actual: '".. actual .."'")
|
multi.error(s .. " Expected: '".. expected .."' Actual: '".. actual .."'")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
},"Test_ENV")
|
||||||
|
|
||||||
multi:newThread("Scheduler Thread",function()
|
multi:newThread("Scheduler Thread",function()
|
||||||
queue = multi:newSystemThreadedQueue("Test_Queue"):init()
|
queue = multi:newSystemThreadedQueue("Test_Queue"):init()
|
||||||
|
|
||||||
th1 = multi:newSystemThread("Test_Thread_1", function(a,b,c,d,e,f)
|
th1 = multi:newSystemThread("Test_Thread_1", function(a,b,c,d,e,f)
|
||||||
queue = THREAD.waitFor("Test_Queue"):init()
|
queue = THREAD.waitFor("Test_Queue"):init()
|
||||||
|
THREAD.exposeENV("Test_ENV")
|
||||||
multi_assert("Test_Thread_1", THREAD.getName(), "Thread name does not match!")
|
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("Passing some args", a, "First argument is not as expected 'Passing some args'")
|
||||||
multi_assert(true, e, "Argument e is not true!")
|
multi_assert(true, e, "Argument e is not true!")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user