mirror of
https://github.com/rayaman/multi.git
synced 2026-09-05 07:27:35 -04:00
Planning out debugManager
This commit is contained in:
+14
-1
@@ -1,7 +1,15 @@
|
||||
package.path = "../?/init.lua;../?.lua;"..package.path
|
||||
multi, thread = require("multi"):init{print=true,warn=true,error=true}
|
||||
multi, thread = require("multi"):init{print=true,warn=true,error=true,debugging=true}
|
||||
require("multi.integration.priorityManager")
|
||||
|
||||
multi.debugging.OnObjectCreated(function(obj, process)
|
||||
multi.print("Created:", obj.Type, "in", process.Type, process:getFullName())
|
||||
end)
|
||||
|
||||
multi.debugging.OnObjectDestroyed(function(obj, process)
|
||||
multi.print("Destroyed:", obj.Type, "in", process.Type, process:getFullName())
|
||||
end)
|
||||
|
||||
-- test = multi:newProcessor("Test")
|
||||
-- test:setPriorityScheme(multi.priorityScheme.TimeBased)
|
||||
|
||||
@@ -68,6 +76,11 @@ proc:newThread(function()
|
||||
end
|
||||
end)
|
||||
|
||||
proc:newAlarm(5):OnRing(function(a)
|
||||
multi.print(";) Goodbye")
|
||||
a:Destroy()
|
||||
end)
|
||||
|
||||
multi:mainloop()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user