mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Fixing SCHEDULER - TO BE FURTHER STUDIES AND FIXED
TASK object should dissapear after nillified. They are hooked to the SCHEDULER... SCHEDULEs should dissapear, but they don't.... To be further studied.
This commit is contained in:
@@ -713,7 +713,9 @@ end
|
||||
function TASK:RemoveStateMachine( TaskUnit )
|
||||
self:F( { TaskUnit, self.Fsm[TaskUnit] ~= nil } )
|
||||
|
||||
self.Fsm[TaskUnit]:Remove()
|
||||
self.Fsm[TaskUnit] = nil
|
||||
|
||||
collectgarbage()
|
||||
self:T( "Garbage Collected, Processes should be finalized now ...")
|
||||
end
|
||||
@@ -830,6 +832,32 @@ function TASK:IsStatePlanned()
|
||||
return self:Is( "Planned" )
|
||||
end
|
||||
|
||||
--- Sets a @{Task} to status **Aborted**.
|
||||
-- @param #TASK self
|
||||
function TASK:StateAborted()
|
||||
self:SetState( self, "State", "Aborted" )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Is the @{Task} status **Aborted**.
|
||||
-- @param #TASK self
|
||||
function TASK:IsStateAborted()
|
||||
return self:Is( "Aborted" )
|
||||
end
|
||||
|
||||
--- Sets a @{Task} to status **Cancelled**.
|
||||
-- @param #TASK self
|
||||
function TASK:StateCancelled()
|
||||
self:SetState( self, "State", "Cancelled" )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Is the @{Task} status **Cancelled**.
|
||||
-- @param #TASK self
|
||||
function TASK:IsStateCancelled()
|
||||
return self:Is( "Cancelled" )
|
||||
end
|
||||
|
||||
--- Sets a @{Task} to status **Assigned**.
|
||||
-- @param #TASK self
|
||||
function TASK:StateAssigned()
|
||||
|
||||
Reference in New Issue
Block a user