Changeset 15284
- Timestamp:
- 07/25/17 14:16:08 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs
r15281 r15284 381 381 pausePending = true; 382 382 lock (locker) { 383 var toPause = clonedAlgorithms.Where(x => x.ExecutionState == ExecutionState.Started) ;383 var toPause = clonedAlgorithms.Where(x => x.ExecutionState == ExecutionState.Started).ToList(); 384 384 foreach (var optimizer in toPause) { 385 385 // a race-condition may occur when the optimizer has changed the state by itself in the meantime … … 399 399 stopPending = true; 400 400 lock (locker) { 401 var toStop = clonedAlgorithms.Where(x => x.ExecutionState == ExecutionState.Started || x.ExecutionState == ExecutionState.Paused) ;401 var toStop = clonedAlgorithms.Where(x => x.ExecutionState == ExecutionState.Started || x.ExecutionState == ExecutionState.Paused).ToList(); 402 402 foreach (var optimizer in toStop) { 403 403 // a race-condition may occur when the optimizer has changed the state by itself in the meantime -
branches/Async/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.cs
r15281 r15284 76 76 pausePending = false; 77 77 OnStarted(); 78 78 79 try { 79 80 Run((object)cancellationTokenSource.Token); … … 87 88 CancellationTokenSource.Dispose(); 88 89 CancellationTokenSource = null; 89 OnStopped(); 90 if (pausePending) OnPaused(); 91 else OnStopped(); 90 92 } 91 93
Note: See TracChangeset
for help on using the changeset viewer.