updated examples (1.7.5)
This commit is contained in:
parent
361012b23b
commit
34853f7fb6
@ -45,7 +45,7 @@ function print(...)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
multi = {}
|
multi = {}
|
||||||
multi.Version={1,7,2}
|
multi.Version={1,7,5}
|
||||||
multi.stage='stable'
|
multi.stage='stable'
|
||||||
multi.__index = multi
|
multi.__index = multi
|
||||||
multi.Mainloop={}
|
multi.Mainloop={}
|
||||||
@ -67,6 +67,7 @@ multi.jobUS=2
|
|||||||
multi.clock=os.clock
|
multi.clock=os.clock
|
||||||
multi.time=os.time
|
multi.time=os.time
|
||||||
multi.LinkedPath=multi
|
multi.LinkedPath=multi
|
||||||
|
mulit.isRunning=false
|
||||||
multi.queuefinal=function(self)
|
multi.queuefinal=function(self)
|
||||||
self:Destroy()
|
self:Destroy()
|
||||||
if self.Parent.Mainloop[#self.Parent.Mainloop] then
|
if self.Parent.Mainloop[#self.Parent.Mainloop] then
|
||||||
@ -952,12 +953,17 @@ function multi:newCondition(func)
|
|||||||
end
|
end
|
||||||
multi.NewCondition=multi.newCondition
|
multi.NewCondition=multi.newCondition
|
||||||
function multi:mainloop()
|
function multi:mainloop()
|
||||||
for i=1,#self.Tasks do
|
if not mulit.isRunning then
|
||||||
self.Tasks[i](self)
|
mulit.isRunning=true
|
||||||
end
|
for i=1,#self.Tasks do
|
||||||
rawset(self,'Start',self.clock())
|
self.Tasks[i](self)
|
||||||
while self.Active do
|
end
|
||||||
self:Do_Order()
|
rawset(self,'Start',self.clock())
|
||||||
|
while self.Active do
|
||||||
|
self:Do_Order()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
return "Already Running!"
|
||||||
end
|
end
|
||||||
--print("Did you call multi:Stop()? This method should not be used when using multi:mainloop() unless of course you wanted to stop it! you can restart the multi, by using multi:reboot() and calling multi:mainloop() again or by using multi:uManager()")
|
--print("Did you call multi:Stop()? This method should not be used when using multi:mainloop() unless of course you wanted to stop it! you can restart the multi, by using multi:reboot() and calling multi:mainloop() again or by using multi:uManager()")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -122,6 +122,8 @@ function multi:newSystemThread(name,func)
|
|||||||
end
|
end
|
||||||
print("Intergrated Lanes!")
|
print("Intergrated Lanes!")
|
||||||
multi.intergration={} -- for module creators
|
multi.intergration={} -- for module creators
|
||||||
|
multi.intergration.GLOBAL=GLOBAL
|
||||||
|
multi.intergration.THREAD=THREAD
|
||||||
multi.intergration.lanes={} -- for module creators
|
multi.intergration.lanes={} -- for module creators
|
||||||
multi.intergration.lanes.GLOBAL=GLOBAL -- for module creators
|
multi.intergration.lanes.GLOBAL=GLOBAL -- for module creators
|
||||||
multi.intergration.lanes.THREAD=THREAD -- for module creators
|
multi.intergration.lanes.THREAD=THREAD -- for module creators
|
||||||
|
|||||||
@ -291,6 +291,8 @@ function THREAD.hold(n)
|
|||||||
multi.OBJ_REF:Resume()
|
multi.OBJ_REF:Resume()
|
||||||
end
|
end
|
||||||
__channels__={}
|
__channels__={}
|
||||||
|
multi.intergration.GLOBAL=GLOBAL
|
||||||
|
multi.intergration.THREAD=THREAD
|
||||||
updater=multi:newUpdater()
|
updater=multi:newUpdater()
|
||||||
updater:OnUpdate(function(self)
|
updater:OnUpdate(function(self)
|
||||||
local data=multi.intergration.love2d.mainChannel:pop()
|
local data=multi.intergration.love2d.mainChannel:pop()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user