Ejemplo n.º 1
0
 public Process()
     : base()
 {
     _allProcesses.AddLast(this);
     childs = new LinkedList<Process>();
     parent = currentExecutingProcess;
     if (parent != null)
     {
         parent.childs.AddLast(this);
     }
 }
Ejemplo n.º 2
0
        public void _ExecuteProcess()
        {
            if (State == State.Ended) return;

            currentExecutingProcess = this;

            this._ExecuteProcessBefore();
            //Console.WriteLine("<Execute " + this + ">");
            this.SwitchTo();
            //Console.WriteLine("</Execute " + this + ">");
            this._ExecuteProcessAfter();
        }