mirror of
https://github.com/rayaman/multi.git
synced 2026-09-05 07:27:35 -04:00
Working on new type system, planning out debugmanager
This commit is contained in:
@@ -35,6 +35,7 @@ end
|
||||
|
||||
function multi:newSystemThreadedQueue(name)
|
||||
local c = {}
|
||||
c.Type = multi.registerType("s_queue")
|
||||
function c:push(v)
|
||||
table.insert(self,v)
|
||||
end
|
||||
@@ -64,6 +65,7 @@ end
|
||||
|
||||
function multi:newSystemThreadedTable(name)
|
||||
local c = {}
|
||||
c.Type = multi.registerType("s_table")
|
||||
function c:init()
|
||||
return self
|
||||
end
|
||||
@@ -88,7 +90,7 @@ function multi:newSystemThreadedJobQueue(n)
|
||||
|
||||
c.cores = n or THREAD.getCores()
|
||||
c.registerQueue = {}
|
||||
c.Type = multi.SJOBQUEUE
|
||||
c.Type = multi.registerType("s_jobqueue")
|
||||
c.funcs = multi:newSystemThreadedTable("__JobQueue_"..jqc.."_table")
|
||||
c.queue = multi:newSystemThreadedQueue("__JobQueue_"..jqc.."_queue")
|
||||
c.queueReturn = multi:newSystemThreadedQueue("__JobQueue_"..jqc.."_queueReturn")
|
||||
|
||||
@@ -91,6 +91,7 @@ function multi:newSystemThread(name, func, ...)
|
||||
local GLOBAL, THREAD = activator.init(thread, env)
|
||||
|
||||
local th = thread:newISOThread(name, func, env, ...)
|
||||
th.Type = multi.registerType("s_thread", "pseudoThreads")
|
||||
|
||||
id = id + 1
|
||||
|
||||
@@ -104,7 +105,7 @@ THREAD.newSystemThread = multi.newSystemThread
|
||||
function THREAD:newFunction(func,holdme)
|
||||
return thread:newFunctionBase(function(...)
|
||||
return multi:newSystemThread("TempSystemThread",func,...)
|
||||
end,holdme)()
|
||||
end, holdme, multi.registerType("s_function", "pseudoFunctions"))()
|
||||
end
|
||||
|
||||
multi.print("Integrated Pesudo Threading!")
|
||||
|
||||
Reference in New Issue
Block a user