Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/13/09 11:59:36 (15 years ago)
Author:
kgrading
Message:

Code Review changes (#522)

File:
1 edited

Legend:

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

    r1260 r1340  
    5252  public class Core: MarshalByRefObject {
    5353    public delegate string GetASnapshotDelegate();
    54 
     54    //Todo: private + getter/setter removen.
    5555    public static Object Locker { get; set; }
    56 
     56    //Todo: ev. Rename to "abortRequested"
    5757    public static bool ShutdownFlag { get; set; }
    58 
     58   
     59    //Todo: Access modifier
    5960    Dictionary<long, Executor> engines = new Dictionary<long, Executor>();
    6061    Dictionary<long, AppDomain> appDomains = new Dictionary<long, AppDomain>();
     
    9899      MessageQueue queue = MessageQueue.GetInstance();
    99100     
    100       //Main processing loop
     101      //Main processing loop     
     102      //Todo: own thread for message handling
    101103      while (!ShutdownFlag) {
    102104        MessageContainer container = queue.GetMessage();
     
    112114    /// <param name="container">The Container, containing the message</param>
    113115    private void DetermineAction(MessageContainer container) {
     116      //Todo: Threads aus Threadpool verwenden
     117     
    114118      switch (container.Message) {
    115119        //Server requests to abort a job
     
    152156    private void GetFinishedJob(object jobId) {
    153157      long jId = (long)jobId;
     158      //Todo: Don't return null, throw exception!
    154159      byte[] sJob = engines[jId].GetFinishedJob();
    155160
     
    162167          true);
    163168      } else {
     169        //Todo: locking
    164170        JobStorrageManager.PersistObjectToDisc(wcfService.ServerIP, wcfService.ServerPort, jId, sJob);
    165171        AppDomain.Unload(appDomains[jId]);
     
    219225    }
    220226
     227    //Todo: Remove intellgent stuff from the async event and move it to the main thread (message queue)
     228    //Todo: Seperate this method into 2: Finished jobs and Snapshots
    221229    void wcfService_SendJobResultCompleted(object sender, SendJobResultCompletedEventArgs e) {
    222230      if (e.Result.Success) {       
     
    237245        }       
    238246      } else {
     247        //Todo: don't Java Style! IT'S EVIL!
    239248        Logging.GetInstance().Error(this.ToString(), "Sending of job " + e.Result.JobId + " failed");
    240249      }
    241250    }
    242251
     252    //Todo: First stop all threads, then terminate
    243253    void wcfService_ServerChanged(object sender, EventArgs e) {
    244254      Logging.GetInstance().Info(this.ToString(), "ServerChanged has been called");
Note: See TracChangeset for help on using the changeset viewer.