Fixed error code issue
This commit is contained in:
parent
5f5723e936
commit
98198a4af2
2
init.lua
2
init.lua
@ -67,7 +67,7 @@ setmetatable(multi.DestroyedObj, {
|
|||||||
end,__newindex = uni,__call = uni,__metatable = multi.DestroyedObj,__tostring = function() return "destroyed" end,__unm = uni,__add = uni,__sub = uni,__mul = uni,__div = uni,__mod = uni,__pow = uni,__concat = uni
|
end,__newindex = uni,__call = uni,__metatable = multi.DestroyedObj,__tostring = function() return "destroyed" end,__unm = uni,__add = uni,__sub = uni,__mul = uni,__div = uni,__mod = uni,__pow = uni,__concat = uni
|
||||||
})
|
})
|
||||||
|
|
||||||
multi.DESTROYED = multi.DestroyedObj
|
multi.DESTROYED = multi.DestroyedObj
|
||||||
|
|
||||||
-- I don't like modifying the global namespace, so I prepend a "$"
|
-- I don't like modifying the global namespace, so I prepend a "$"
|
||||||
if not _G["$multi"] then
|
if not _G["$multi"] then
|
||||||
|
|||||||
@ -5,12 +5,15 @@ multi.defaultSettings.debugging = true
|
|||||||
local dbg = {}
|
local dbg = {}
|
||||||
|
|
||||||
local creation_hook
|
local creation_hook
|
||||||
|
local types
|
||||||
|
|
||||||
creation_hook = function(obj, process)
|
creation_hook = function(obj, process)
|
||||||
|
local types = multi:getTypes()
|
||||||
print("Created: ",obj.Type, "in", process.Type, process:getFullName())
|
print("Created: ",obj.Type, "in", process.Type, process:getFullName())
|
||||||
if obj.Type == multi.PROCESS then
|
if obj.Type == multi.PROCESS then
|
||||||
obj.OnObjectCreated(creation_hook)
|
obj.OnObjectCreated(creation_hook)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local debug_stats = {}
|
local debug_stats = {}
|
||||||
@ -19,6 +22,8 @@ local tmulti = multi:getThreadManagerProcess()
|
|||||||
multi.OnObjectCreated(creation_hook)
|
multi.OnObjectCreated(creation_hook)
|
||||||
tmulti.OnObjectCreated(creation_hook)
|
tmulti.OnObjectCreated(creation_hook)
|
||||||
|
|
||||||
|
multi
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
multi.ROOTPROCESS = "rootprocess"
|
multi.ROOTPROCESS = "rootprocess"
|
||||||
multi.CONNECTOR = "connector"
|
multi.CONNECTOR = "connector"
|
||||||
|
|||||||
@ -175,12 +175,24 @@ runTest = thread:newFunction(function()
|
|||||||
end
|
end
|
||||||
if not love then
|
if not love then
|
||||||
local ec = 0
|
local ec = 0
|
||||||
multi.print("Testing pseudo threading")
|
if _VERSION > "5.1" then
|
||||||
ec = ec + os.execute("lua tests/threadtests.lua p")
|
multi.print("Testing pseudo threading")
|
||||||
multi.print("Testing lanes threading")
|
_, str, ecc = os.execute("lua tests/threadtests.lua p")
|
||||||
ec = ec + os.execute("lua tests/threadtests.lua l")
|
ec = ec + ecc
|
||||||
if ec ~= 0 then
|
multi.print("Testing lanes threading")
|
||||||
os.exit(1)
|
_, str, ecc = os.execute("lua tests/threadtests.lua l")
|
||||||
|
ec = ec + ecc
|
||||||
|
if ec ~= 0 then
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
multi.print("Testing pseudo threading")
|
||||||
|
ec = ec + os.execute("lua tests/threadtests.lua p")
|
||||||
|
multi.print("Testing lanes threading")
|
||||||
|
ec = ec + os.execute("lua tests/threadtests.lua l")
|
||||||
|
if ec ~= 0 then
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user