Fixed and documented the newProcessor changes. Rockspec fix
This commit is contained in:
parent
e8a3cd731d
commit
c0fb94ddbb
@ -13,6 +13,9 @@ Full Update Showcase
|
|||||||
|
|
||||||
Added:
|
Added:
|
||||||
---
|
---
|
||||||
|
- `multi:newProcessor(name, nothread)`
|
||||||
|
- If no thread is true auto sets the processor as Active, so proc.run() will start without the need for proc.Start()
|
||||||
|
|
||||||
- `multi:getProcessors()`
|
- `multi:getProcessors()`
|
||||||
- Returns a list of all processors
|
- Returns a list of all processors
|
||||||
|
|
||||||
@ -30,10 +33,10 @@ Added:
|
|||||||
- `multi:getThreads()`
|
- `multi:getThreads()`
|
||||||
- Returns a list of all threads on a process
|
- Returns a list of all threads on a process
|
||||||
|
|
||||||
- `multi:newProcessor(name,nothread).run()`
|
- `multi:newProcessor(name, nothread).run()`
|
||||||
- New function run to the processor object to
|
- New function run to the processor object to
|
||||||
|
|
||||||
- `multi:newProcessor(name,nothread):newFunction(func,holdme)`
|
- `multi:newProcessor(name, nothread):newFunction(func, holdme)`
|
||||||
- Acts like thread:newFunction(), but binds the execution of that threaded function to the processor
|
- Acts like thread:newFunction(), but binds the execution of that threaded function to the processor
|
||||||
|
|
||||||
- `multi:newTLoop()` member functions
|
- `multi:newTLoop()` member functions
|
||||||
|
|||||||
@ -21,8 +21,8 @@ build = {
|
|||||||
type = "builtin",
|
type = "builtin",
|
||||||
modules = {
|
modules = {
|
||||||
["multi"] = "multi/init.lua",
|
["multi"] = "multi/init.lua",
|
||||||
["multi.compat.love2d"] = "multi/compat/love2d.lua",
|
--["multi.compat.love2d"] = "multi/compat/love2d.lua",
|
||||||
["multi.compat.lovr"] = "multi/compat/lovr.lua",
|
--["multi.compat.lovr"] = "multi/compat/lovr.lua",
|
||||||
["multi.integration.lanesManager"] = "multi/integration/lanesManager/init.lua",
|
["multi.integration.lanesManager"] = "multi/integration/lanesManager/init.lua",
|
||||||
["multi.integration.lanesManager.extensions"] = "multi/integration/lanesManager/extensions.lua",
|
["multi.integration.lanesManager.extensions"] = "multi/integration/lanesManager/extensions.lua",
|
||||||
["multi.integration.lanesManager.threads"] = "multi/integration/lanesManager/threads.lua",
|
["multi.integration.lanesManager.threads"] = "multi/integration/lanesManager/threads.lua",
|
||||||
|
|||||||
@ -2,7 +2,7 @@ if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
|
|||||||
package.path="multi/?.lua;multi/?/init.lua;multi/?.lua;multi/?/?/init.lua;"..package.path
|
package.path="multi/?.lua;multi/?/init.lua;multi/?.lua;multi/?/?/init.lua;"..package.path
|
||||||
require("lldebugger").start()
|
require("lldebugger").start()
|
||||||
else
|
else
|
||||||
package.path="./?.lua;../?/init.lua;../?.lua;../?/?/init.lua;"..package.path
|
--package.path="./?.lua;../?/init.lua;../?.lua;../?/?/init.lua;"..package.path
|
||||||
end
|
end
|
||||||
--[[
|
--[[
|
||||||
This file runs all tests.
|
This file runs all tests.
|
||||||
@ -20,9 +20,9 @@ end
|
|||||||
The expected and actual should "match" (Might be impossible when playing with threads)
|
The expected and actual should "match" (Might be impossible when playing with threads)
|
||||||
This will be pushed directly to the master as tests start existing.
|
This will be pushed directly to the master as tests start existing.
|
||||||
]]
|
]]
|
||||||
local multi, thread = require("multi"):init{priority=true}
|
local multi, thread = require("multi"):init()--{priority=true}
|
||||||
local good = false
|
local good = false
|
||||||
local proc = multi:newProcessor("Test")
|
local proc = multi:newProcessor("Test",true)
|
||||||
proc:newAlarm(3):OnRing(function()
|
proc:newAlarm(3):OnRing(function()
|
||||||
good = true
|
good = true
|
||||||
end)
|
end)
|
||||||
@ -148,6 +148,7 @@ end)
|
|||||||
runTest().OnError(function(...)
|
runTest().OnError(function(...)
|
||||||
print("Error:",...)
|
print("Error:",...)
|
||||||
end)
|
end)
|
||||||
|
print("Pumping proc")
|
||||||
while true do
|
while true do
|
||||||
proc.run()
|
proc.run()
|
||||||
end
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user