From 85dbe20f9f18bd979dbcd0e5cece27585ceb41d7 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 25 May 2017 00:45:13 +0000 Subject: [PATCH] made process IDs static hopefully --- modules/base/footer.lua | 2 +- modules/base/header.lua | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/base/footer.lua b/modules/base/footer.lua index 3da2acd..1cacb73 100644 --- a/modules/base/footer.lua +++ b/modules/base/footer.lua @@ -5,7 +5,7 @@ while #tT > 0 do if C.status(v[2])~="dead" then C.resume(v[2],table.unpack(ev)) else - T.remove(tT,k) + tT[k] = nil end end end diff --git a/modules/base/header.lua b/modules/base/header.lua index be6546d..a9ee54e 100644 --- a/modules/base/header.lua +++ b/modules/base/header.lua @@ -1,4 +1,4 @@ -tT,p,cT,C,T={},1,1,coroutine,table +tT,p,cT,pC,C,T={},1,1,1,coroutine,table function E() if tT[cT] ~= nil then return tT[cT][3] end end @@ -9,5 +9,6 @@ function h(...) computer.pushSignal(...) end function s(n,f,e) - T.insert(tT,{n,C.create(f),(e or E() or {})}) + tT[pC]={n,C.create(f),(e or E() or {})} + pC=pC+1 end