V15.3.0 #46

Merged
rayaman merged 85 commits from v15.3.0 into network_parallelism_test_branch 2022-06-11 23:41:07 -04:00
2 changed files with 0 additions and 22 deletions
Showing only changes of commit 03ffb6bc0a - Show all commits

View File

@ -13,12 +13,6 @@ Full Update Showcase
Added: Added:
--- ---
- `multi:lock()`
- Locks a multi object which prevents, Destroy(), Pause(), and Resume() being processed.
- `multi:unlock()`
- Undoes the lock
- `multi:getProcessors()` - `multi:getProcessors()`
- Returns a list of all processors - Returns a list of all processors

View File

@ -446,14 +446,6 @@ function multi:getType()
return self.Type return self.Type
end end
function multi:lock()
self.__locked = true
end
function multi:unlock()
self.__locked = false
end
-- Advance Timer stuff -- Advance Timer stuff
function multi:SetTime(n) function multi:SetTime(n)
if not n then n=3 end if not n then n=3 end
@ -486,7 +478,6 @@ end
-- Timer stuff done -- Timer stuff done
multi.PausedObjects = {} multi.PausedObjects = {}
function multi:Pause() function multi:Pause()
if self.__locked then multi.print("Cannot perform action on a locked object!") return end
if self.Type=='rootprocess' then if self.Type=='rootprocess' then
multi.print("You cannot pause the main process. Doing so will stop all methods and freeze your program! However if you still want to use multi:_Pause()") multi.print("You cannot pause the main process. Doing so will stop all methods and freeze your program! However if you still want to use multi:_Pause()")
else else
@ -504,7 +495,6 @@ function multi:Pause()
end end
function multi:Resume() function multi:Resume()
if self.__locked then multi.print("Cannot perform action on a locked object!") return end
if self.Type=='process' or self.Type=='rootprocess' then if self.Type=='process' or self.Type=='rootprocess' then
self.Active=true self.Active=true
local c=self:getChildren() local c=self:getChildren()
@ -522,7 +512,6 @@ function multi:Resume()
end end
function multi:Destroy() function multi:Destroy()
if self.__locked then multi.print("Cannot perform action on a locked object!") return end
if self.Type=='process' or self.Type=='rootprocess' then if self.Type=='process' or self.Type=='rootprocess' then
local c=self:getChildren() local c=self:getChildren()
for i=1,#c do for i=1,#c do
@ -592,7 +581,6 @@ function multi:newBase(ins)
c.Act=function() end c.Act=function() end
c.Parent=self c.Parent=self
c.creationTime = os.clock() c.creationTime = os.clock()
c.__locked = false
if ins then if ins then
table.insert(self.Mainloop,ins,c) table.insert(self.Mainloop,ins,c)
else else
@ -707,7 +695,6 @@ function multi:newAlarm(set)
end end
end end
function c:Resume() function c:Resume()
if self.__locked then multi.print("Cannot perform action on a locked object!") return end
self.Parent.Resume(self) self.Parent.Resume(self)
t = count + t t = count + t
return self return self
@ -720,7 +707,6 @@ function multi:newAlarm(set)
end end
c.OnRing = self:newConnection() c.OnRing = self:newConnection()
function c:Pause() function c:Pause()
if self.__locked then multi.print("Cannot perform action on a locked object!") return end
count = clock() count = clock()
self.Parent.Pause(self) self.Parent.Pause(self)
return self return self
@ -831,13 +817,11 @@ function multi:newTLoop(func,set)
self.set = set self.set = set
end end
function c:Resume() function c:Resume()
if self.__locked then multi.print("Cannot perform action on a locked object!") return end
self.Parent.Resume(self) self.Parent.Resume(self)
self.timer:Resume() self.timer:Resume()
return self return self
end end
function c:Pause() function c:Pause()
if self.__locked then multi.print("Cannot perform action on a locked object!") return end
self.timer:Pause() self.timer:Pause()
self.Parent.Pause(self) self.Parent.Pause(self)
return self return self