Merge branch 'OC1.3-MC1.6.4' of github.com:MightyPirates/OpenComputers

This commit is contained in:
Florian Nücke 2014-08-25 22:04:27 +02:00
commit cc9c38c16d
2 changed files with 7 additions and 4 deletions

View File

@ -7,7 +7,10 @@ local coroutine_create = coroutine.create
local function findProcess(co)
co = co or coroutine.running()
for _, process in pairs(running) do
for main, process in pairs(running) do
if main == co then
return process
end
for _, instance in pairs(process.instances) do
if instance == co then
return process
@ -62,7 +65,7 @@ function process.load(path, env, init, name)
command = name,
env = env,
parent = process,
instances = setmetatable({thread}, {__mode="v"})
instances = setmetatable({}, {__mode="v"})
}
return thread
end
@ -95,7 +98,7 @@ function process.install(path, name)
path = path,
command = name,
env = _ENV,
instances = setmetatable({thread}, {__mode="v"})
instances = setmetatable({}, {__mode="v"})
}
end

View File

@ -469,7 +469,7 @@ end
local libcomponent
local proxyCache = setmetatable({}, {__mode="v"})
local proxyDirectCache = setmetatable({}, {__mode="v"})
local proxyDirectCache = setmetatable({}, {__mode="k"})
local componentCallback = {
__call = function(self, ...)