Changeset 11204 for branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.Slave/3.3/SlaveTask.cs
- Timestamp:
- 07/18/14 13:34:37 (10 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.Slave
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.Slave
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/sources/HeuristicLab.Clients.Hive.Slave merged eligible /branches/Algorithms.GradientDescent/HeuristicLab.Clients.Hive.Slave 5516-5520 /branches/Benchmarking/sources/HeuristicLab.Clients.Hive.Slave 6917-7005 /branches/CloningRefactoring/HeuristicLab.Clients.Hive.Slave 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Clients.Hive.Slave 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Clients.Hive.Slave 5815-6180 /branches/DataAnalysis/HeuristicLab.Clients.Hive.Slave 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.Clients.Hive.Slave 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Clients.Hive.Slave 5060 /branches/NET40/sources/HeuristicLab.Clients.Hive.Slave 5138-5162 /branches/ParallelEngine/HeuristicLab.Clients.Hive.Slave 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Clients.Hive.Slave 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Clients.Hive.Slave 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Clients.Hive.Slave 6828 /branches/RuntimeOptimizer/HeuristicLab.Clients.Hive.Slave 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Clients.Hive.Slave 7787-8333 /branches/SlaveShutdown/HeuristicLab.Clients.Hive.Slave 8944-8956 /branches/SuccessProgressAnalysis/HeuristicLab.Clients.Hive.Slave 5370-5682 /branches/Trunk/HeuristicLab.Clients.Hive.Slave 6829-6865 /branches/UnloadJobs/HeuristicLab.Clients.Hive.Slave 9168-9215 /branches/VNS/HeuristicLab.Clients.Hive.Slave 5594-5752 /branches/histogram/HeuristicLab.Clients.Hive.Slave 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.Slave/3.3/SlaveTask.cs
r11203 r11204 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.