Changeset 15367 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis
- Timestamp:
- 09/18/17 12:18:47 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs
r15287 r15367 352 352 allAlgorithmsFinished = new ManualResetEventSlim(false); 353 353 354 var startedTasks = new List<Task>(clonedAlgorithms.Count); 355 354 356 //start prepared or paused cloned algorithms 355 357 foreach (IAlgorithm clonedAlgorithm in clonedAlgorithms) { … … 360 362 lock (locker) { 361 363 if (pausePending || stopPending || ExecutionState != ExecutionState.Started) break; 362 clonedAlgorithm.StartAsync(cancellationToken); 364 var task = clonedAlgorithm.StartAsync(cancellationToken); 365 startedTasks.Add(task); 363 366 } 364 367 } … … 366 369 367 370 allAlgorithmsFinished.Wait(); 371 372 Task.WaitAll(startedTasks.ToArray()); // to get exceptions not handled within the tasks 368 373 } 369 374
Note: See TracChangeset
for help on using the changeset viewer.