Working on new type system, planning out debugmanager

This commit is contained in:
2023-09-04 12:03:00 -04:00
parent a660b63581
commit 5f5723e936
11 changed files with 98 additions and 87 deletions
+4 -4
View File
@@ -34,7 +34,7 @@ function multi:newSystemThreadedQueue(name)
local c = {}
c.Name = name
c.linda = lanes.linda()
c.Type = multi.SQUEUE
c.Type = multi.registerType("s_queue")
function c:push(v)
self.linda:send("Q", v)
@@ -81,7 +81,7 @@ function multi:newSystemThreadedTable(name)
local c = {}
c.link = lanes.linda()
c.Name = name
c.Type = multi.STABLE
c.Type = multi.registerType("s_table")
function c:init()
return self
@@ -121,7 +121,7 @@ end
function multi:newSystemThreadedJobQueue(n)
local c = {}
c.cores = n or THREAD.getCores()*2
c.Type = multi.SJOBQUEUE
c.Type = multi.registerType("s_jobqueue")
c.OnJobCompleted = multi:newConnection()
local funcs = multi:newSystemThreadedTable()
local queueJob = multi:newSystemThreadedQueue()
@@ -250,7 +250,7 @@ end
function multi:newSystemThreadedConnection(name)
local name = name or multi.randomString(16)
local c = {}
c.Type = multi.SCONNECTION
c.Type = multi.registerType("s_connection")
c.CONN = 0x00
c.TRIG = 0x01
c.PING = 0x02
+2 -2
View File
@@ -61,7 +61,7 @@ local livingThreads = {}
function THREAD:newFunction(func, holdme)
return thread:newFunctionBase(function(...)
return multi:newSystemThread("TempSystemThread",func,...)
end, holdme, multi.SFUNCTION)()
end, holdme, multi.registerType("s_function"))()
end
function multi:newSystemThread(name, func, ...)
@@ -75,7 +75,7 @@ function multi:newSystemThread(name, func, ...)
c.loadString = {"base","package","os","io","math","table","string","coroutine"}
livingThreads[count] = {true, name}
c.returns = return_linda
c.Type = multi.STHREAD
c.Type = multi.registerType("s_thread")
c.creationTime = os.clock()
c.alive = true
c.priority = THREAD.Priority_Normal