Changeset 17445 for trunk/HeuristicLab.Clients.Hive.Slave/3.3
- Timestamp:
- 02/19/20 13:50:24 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Clients.Hive.Slave/3.3/Executor.cs
r17180 r17445 46 46 public bool IsStopping { get; set; } 47 47 public bool IsPausing { get; set; } 48 public bool HasFailed { get; set; } 48 49 49 50 public Exception CurrentException; … … 84 85 85 86 task.Start(); 86 if (!startTaskSem.WaitOne(Settings.Default.ExecutorSemTimeouts) ) {87 if (!startTaskSem.WaitOne(Settings.Default.ExecutorSemTimeouts) && !HasFailed) { 87 88 throw new TimeoutException("Timeout when starting the task. TaskStarted event was not fired."); 88 89 } … … 159 160 #region Task Events 160 161 private void Task_TaskFailed(object sender, EventArgs e) { 162 HasFailed = true; 161 163 IsStopping = true; 162 164 EventArgs<Exception> ex = (EventArgs<Exception>)e; 163 165 CurrentException = ex.Value; 164 166 executorQueue.AddMessage(ExecutorMessageType.TaskFailed); 167 startTaskSem.Set(); // cancel waiting for startup 165 168 } 166 169
Note: See TracChangeset
for help on using the changeset viewer.