Changeset 1083


Ignore:
Timestamp:
01/07/09 16:15:51 (12 years ago)
Author:
kgrading
Message:

added shutdownflag (#401)

Location:
trunk/sources/HeuristicLab.Hive.Client.Core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Core/ClientConsoleService/ClientConsoleCommunicator.cs

    r1033 r1083  
    3434    }
    3535
     36    public void ShutdownClient() {
     37      Core.ShutdownFlag = true;
     38    }
     39
    3640    #endregion
    3741  }
  • trunk/sources/HeuristicLab.Hive.Client.Core/ClientConsoleService/Interfaces/IClientConsoleCommunicator.cs

    r959 r1083  
    1818    [OperationContract]
    1919    ConnectionContainer GetCurrentConnection();
     20    [OperationContract]
     21    void ShutdownClient();
    2022  }
    2123}
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r1081 r1083  
    5151    public static Object Locker { get; set; }
    5252
     53    public static bool ShutdownFlag { get; set; }
     54
    5355    Dictionary<long, Executor> engines = new Dictionary<long, Executor>();
    5456    Dictionary<long, AppDomain> appDomains = new Dictionary<long, AppDomain>();
     
    5961    public void Start() {
    6062      Core.Locker = new Object();
     63      ShutdownFlag = false;
     64
    6165      Logging.GetInstance().Info(this.ToString(), "Hive Client started");
    6266      ClientConsoleServer server = new ClientConsoleServer();
     
    8286
    8387      MessageQueue queue = MessageQueue.GetInstance();
    84       while (true) {
     88      while (!ShutdownFlag) {
    8589        MessageContainer container = queue.GetMessage();
    8690        Debug.WriteLine("Main loop received this message: " + container.Message.ToString());
     
    135139
    136140    #region wcfService Events
    137 
    138     void wcfService_ConnectionRestored(object sender, EventArgs e) {
    139       //Do some fancy new things here... e.g: check all appdomains if there are still active Jobs that need to be transmitted
    140     }
    141141
    142142    void wcfService_LoginCompleted(object sender, LoginCompletedEventArgs e) {
     
    201201    }
    202202
     203    void wcfService_ConnectionRestored(object sender, EventArgs e) {
     204      //Do some fancy new things here... e.g: check all appdomains if there are still active Jobs that need to be transmitted
     205    }
    203206
    204207    #endregion
Note: See TracChangeset for help on using the changeset viewer.