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:
@@ -129,7 +129,7 @@ function multi:newSystemThreadedJobQueue(n)
|
||||
local rets
|
||||
link = c.OnJobCompleted(function(jid,...)
|
||||
if id==jid then
|
||||
rets = {...}
|
||||
rets = multi.pack(...)
|
||||
end
|
||||
end)
|
||||
return thread.hold(function()
|
||||
@@ -230,7 +230,7 @@ function multi:newSystemThreadedConnection(name)
|
||||
self.subscribe = love.thread.getChannel("SUB_STC_" .. self.Name)
|
||||
|
||||
function self:Fire(...)
|
||||
local args = {...}
|
||||
local args = multi.pack(...)
|
||||
if self.CID == THREAD_ID then -- Host Call
|
||||
for _, link in pairs(self.links) do
|
||||
love.thread.getChannel(link):push{self.TRIG, args}
|
||||
@@ -321,7 +321,7 @@ function multi:newSystemThreadedConnection(name)
|
||||
|
||||
local function fire(...)
|
||||
for _, link in pairs(c.links) do
|
||||
love.thread.getChannel(link):push {c.TRIG, {...}}
|
||||
love.thread.getChannel(link):push {c.TRIG, multi.pack(...)}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -103,6 +103,13 @@ function multi:newSystemThread(name, func, ...)
|
||||
c.stab.returns = nil
|
||||
end
|
||||
end)
|
||||
|
||||
if self.isActor then
|
||||
self:create(c)
|
||||
else
|
||||
multi.create(multi, c)
|
||||
end
|
||||
|
||||
return c
|
||||
end
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ end
|
||||
|
||||
function threads.pushStatus(...)
|
||||
local status_channel = love.thread.getChannel("STATCHAN_" ..__THREADID__)
|
||||
local args = {...}
|
||||
local args = multi.pack(...)
|
||||
status_channel:push(args)
|
||||
end
|
||||
|
||||
@@ -209,7 +209,7 @@ function threads.getConsole()
|
||||
local c = {}
|
||||
c.queue = love.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