Changeset 11202 for branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.Slave/3.3/SlaveTask.cs
- Timestamp:
- 07/18/14 12:01:13 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.Slave/3.3/SlaveTask.cs
r7259 r11202 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 43 43 public Guid TaskId { get; private set; } 44 44 public bool IsPrepared { get; private set; } 45 private TaskData originalTaskData; 45 46 46 47 private int coresNeeded; … … 74 75 try { 75 76 this.TaskId = task.Id; 77 originalTaskData = taskData; 76 78 Prepare(task); 77 79 StartTaskInAppDomain(taskData); … … 143 145 while (repeat > 0) { 144 146 try { 145 waitForStartBeforeKillSem.WaitOne( );147 waitForStartBeforeKillSem.WaitOne(Settings.Default.ExecutorSemTimeouts); 146 148 AppDomain.Unload(appDomain); 147 149 waitForStartBeforeKillSem.Dispose(); … … 164 166 private void AppDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { 165 167 DisposeAppDomain(); 166 On ExceptionOccured(new Exception("Unhandled exception: " + e.ExceptionObject.ToString()));168 OnTaskFailed(new Exception("Unhandled exception: " + e.ExceptionObject.ToString())); 167 169 } 168 170 … … 171 173 try { 172 174 data = executor.GetTaskData(); 175 //this means that there was a problem executing the task 176 if (data == null) return originalTaskData; 173 177 } 174 178 catch (Exception ex) { … … 233 237 executorMonitoringRun = false; 234 238 break; 235 236 case ExecutorMessageType.ExceptionOccured:237 executorMonitoringRun = false;238 DisposeAppDomain();239 if (executor.CurrentException != null) {240 OnExceptionOccured(executor.CurrentException);241 } else {242 OnExceptionOccured(new Exception(string.Format("Unknow exception occured in Executor for task {0}", TaskId)));243 }244 break;245 239 } 246 240 } … … 277 271 if (handler != null) handler(this, new EventArgs<Guid, Exception>(this.TaskId, exception)); 278 272 } 279 280 public event EventHandler<EventArgs<Guid, Exception>> ExceptionOccured;281 private void OnExceptionOccured(Exception exception) {282 var handler = ExceptionOccured;283 if (handler != null) handler(this, new EventArgs<Guid, Exception>(this.TaskId, exception));284 }285 273 } 286 274 }
Note: See TracChangeset
for help on using the changeset viewer.