Changeset 1846


Ignore:
Timestamp:
Aug 20, 2010, 10:50:35 AM (11 years ago)
Author:
kopal
Message:

schedulers now log startups and endings

Location:
trunk/CrypPlugins/WorkspaceManager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/Execution/ExecutionEngine.cs

    r1844 r1846  
    4343        private Scheduler[] schedulers;
    4444        private WorkspaceModel workspaceModel;
     45        private volatile bool isRunning = false;
    4546
    4647        public long ExecutedPluginsCounter { get; set; }
     
    6364        public bool IsRunning
    6465        {
    65             get;
    66             private set;
     66            get{return this.isRunning;}
     67            private set{this.isRunning = value;}
    6768        }
    6869
     
    8586                for (int i = 0; i < amountSchedulers; i++)
    8687                {
    87                     schedulers[i] = new WorkspaceManagerScheduler("Scheduler" + i);                   
     88                    schedulers[i] = new WorkspaceManagerScheduler("WorkspaceManagerScheduler-" + i);
     89                    ((WorkspaceManagerScheduler)schedulers[i]).executionEngine = this;
    8890                }
    8991               
     
    561563        private System.Threading.Thread thread;
    562564        private Context currentContext;
     565        public ExecutionEngine executionEngine = null;
    563566
    564567                public WorkspaceManagerScheduler() : this(String.Empty)
     
    585588        private void Start()
    586589        {
    587             if (this.currentContext != Thread.CurrentContext)
    588                 this.currentContext.DoCallBack(Start);
     590            if (this.currentContext != Thread.CurrentContext){
     591                this.currentContext.DoCallBack(Start);}
     592           
     593            this.executionEngine.GuiLogMessage("Scheduler " + this.thread.Name + " up and running", NotificationLevel.Debug);
    589594
    590595            // Loop forever
     
    598603                    // Should the scheduler stop?
    599604                    if (this.shutdown)
     605                    {
     606                        this.executionEngine.GuiLogMessage("Scheduler " + this.thread.Name + " terminated", NotificationLevel.Debug);
    600607                        return;
     608                    }
    601609                   
    602610                    ProtocolBase protocol = null;
  • trunk/CrypPlugins/WorkspaceManager/WorkspaceManager.cs

    r1836 r1846  
    7474        private WorkSpaceEditorView WorkspaceSpaceEditorView = null;
    7575        private ExecutionEngine ExecutionEngine = null;
    76         private bool executing = false;
     76        private volatile bool executing = false;
    7777
    7878        #endregion
Note: See TracChangeset for help on using the changeset viewer.