Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/28/17 08:04:05 (7 years ago)
Author:
jkarder
Message:

#2830: merged r15367 into stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Algorithms.DataAnalysis

  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs

    r15292 r15384  
    352352      allAlgorithmsFinished = new ManualResetEventSlim(false);
    353353
     354      var startedTasks = new List<Task>(clonedAlgorithms.Count);
     355
    354356      //start prepared or paused cloned algorithms
    355357      foreach (IAlgorithm clonedAlgorithm in clonedAlgorithms) {
     
    360362          lock (locker) {
    361363            if (pausePending || stopPending || ExecutionState != ExecutionState.Started) break;
    362             clonedAlgorithm.StartAsync(cancellationToken);
     364            var task = clonedAlgorithm.StartAsync(cancellationToken);
     365            startedTasks.Add(task);
    363366          }
    364367        }
     
    366369
    367370      allAlgorithmsFinished.Wait();
     371
     372      Task.WaitAll(startedTasks.ToArray()); // to get exceptions not handled within the tasks
    368373    }
    369374
Note: See TracChangeset for help on using the changeset viewer.