public final void cancel ( ) { cancelRunningChildren ( 0 ) ; Status previousStatus = status ; status = Status . CANCELLED ; if ( tree . listeners != null && tree . listeners . size > 0 ) tree . notifyStatusUpdated ( this , previousStatus ) ; end ( ) ; }
Terminates this task and all its running children . This method MUST be called only if this task is running .