Ejemplo n.º 1
0
        ///
        ///Terminates the child task and unregister itself from the list of
        ///interrupters of the BTExecutor.

        protected override void InternalTerminate()
        {
            ///
            ///Unregister the ExecutionInterrupter so that it is no longer available
            ///to ExecutionPerformInterruption.
            ///
            Executor.UnregisterInterrupter(this);
            ///
            ///It is important to cancel any request for insertion that this task
            ///has. If the task has been interrupted, it will have requested to be
            ///inserted into the list of tickable nodes. However, if it is then
            ///terminated, we do not want it to be inserted into the list of
            ///tickable nodes, so the request made in "interrupt()" must be
            ///cancelled.
            ///
            if (_interrupted)
            {
                Executor.CancelInsertionRequest(BTExecutor.BTExecutorList.Tickable, this);
            }

            _executionChild.Terminate();
        }