mirror of
https://github.com/rayaman/multi.git
synced 2026-09-05 07:27:35 -04:00
Removed extra bloat, proxies are portable now!
This commit is contained in:
@@ -118,7 +118,7 @@ function multi:newSystemThreadedJobQueue(n)
|
||||
local rets
|
||||
link = c.OnJobCompleted(function(jid,...)
|
||||
if id==jid then
|
||||
rets = {...}
|
||||
rets = multi.pack(...)
|
||||
link:Destroy()
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -76,6 +76,13 @@ function multi:newSystemThread(name,func,...)
|
||||
GLOBAL["__THREAD_"..c.ID] = {ID=c.ID,Name=c.name,Thread=c.thread}
|
||||
GLOBAL["__THREAD_COUNT"] = THREAD_ID
|
||||
THREAD_ID=THREAD_ID+1
|
||||
|
||||
if self.isActor then
|
||||
self:create(c)
|
||||
else
|
||||
multi.create(multi, c)
|
||||
end
|
||||
|
||||
return c
|
||||
end
|
||||
THREAD.newSystemThread = multi.newSystemThread
|
||||
|
||||
@@ -156,7 +156,7 @@ function threads.getConsole()
|
||||
local c = {}
|
||||
c.queue = lovr.thread.getChannel("__CONSOLE__")
|
||||
function c.print(...)
|
||||
c.queue:push{...}
|
||||
c.queue:push(multi.pack(...))
|
||||
end
|
||||
function c.error(err)
|
||||
c.queue:push{"ERROR in <"..__THREADNAME__..">: "..err,__THREADID__}
|
||||
|
||||
Reference in New Issue
Block a user