Changeset 1340 for trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
- Timestamp:
- 03/13/09 11:59:36 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r1260 r1340 52 52 public class Core: MarshalByRefObject { 53 53 public delegate string GetASnapshotDelegate(); 54 54 //Todo: private + getter/setter removen. 55 55 public static Object Locker { get; set; } 56 56 //Todo: ev. Rename to "abortRequested" 57 57 public static bool ShutdownFlag { get; set; } 58 58 59 //Todo: Access modifier 59 60 Dictionary<long, Executor> engines = new Dictionary<long, Executor>(); 60 61 Dictionary<long, AppDomain> appDomains = new Dictionary<long, AppDomain>(); … … 98 99 MessageQueue queue = MessageQueue.GetInstance(); 99 100 100 //Main processing loop 101 //Main processing loop 102 //Todo: own thread for message handling 101 103 while (!ShutdownFlag) { 102 104 MessageContainer container = queue.GetMessage(); … … 112 114 /// <param name="container">The Container, containing the message</param> 113 115 private void DetermineAction(MessageContainer container) { 116 //Todo: Threads aus Threadpool verwenden 117 114 118 switch (container.Message) { 115 119 //Server requests to abort a job … … 152 156 private void GetFinishedJob(object jobId) { 153 157 long jId = (long)jobId; 158 //Todo: Don't return null, throw exception! 154 159 byte[] sJob = engines[jId].GetFinishedJob(); 155 160 … … 162 167 true); 163 168 } else { 169 //Todo: locking 164 170 JobStorrageManager.PersistObjectToDisc(wcfService.ServerIP, wcfService.ServerPort, jId, sJob); 165 171 AppDomain.Unload(appDomains[jId]); … … 219 225 } 220 226 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 221 229 void wcfService_SendJobResultCompleted(object sender, SendJobResultCompletedEventArgs e) { 222 230 if (e.Result.Success) { … … 237 245 } 238 246 } else { 247 //Todo: don't Java Style! IT'S EVIL! 239 248 Logging.GetInstance().Error(this.ToString(), "Sending of job " + e.Result.JobId + " failed"); 240 249 } 241 250 } 242 251 252 //Todo: First stop all threads, then terminate 243 253 void wcfService_ServerChanged(object sender, EventArgs e) { 244 254 Logging.GetInstance().Info(this.ToString(), "ServerChanged has been called");
Note: See TracChangeset
for help on using the changeset viewer.