Ignore:
Timestamp:
3/9/2008 2:32:33 PM (7 years ago)
Author:
lowjoel
Message:

Allow the DirectExecutor? class to be disposable, thus ending the thread when the program is exiting thus allowing immediate exit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Manager/DirectExecutor.cs

    r163 r171  
    1111    /// is run without the help of a Service. 
    1212    /// </summary> 
    13     public class DirectExecutor : Executor 
     13    public class DirectExecutor : Executor, IDisposable 
    1414    { 
    1515        public DirectExecutor() 
     
    2222            thread.Start(); 
    2323            Thread.Sleep(0); 
     24        } 
     25 
     26        void IDisposable.Dispose() 
     27        { 
     28            thread.Abort(); 
     29            schedulerInterrupt.Set(); 
    2430        } 
    2531 
Note: See TracChangeset for help on using the changeset viewer.