Changeset 15408 for trunk/sources/HeuristicLab.Optimization/3.3/Algorithms
- Timestamp:
- 10/06/17 14:13:21 (7 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization
- Property svn:mergeinfo changed
/branches/ParallelExperiment/HeuristicLab.Optimization (added) merged: 15337,15373,15375,15389,15394,15407
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.cs
r15367 r15408 80 80 try { 81 81 Run((object)cancellationTokenSource.Token); 82 } 83 catch (OperationCanceledException) { 84 } 85 catch (AggregateException ae) { 82 } catch (OperationCanceledException) { 83 } catch (AggregateException ae) { 86 84 ae.FlattenAndHandle(new[] { typeof(OperationCanceledException) }, e => OnExceptionOccurred(e)); 87 } 88 catch (Exception e) { 85 } catch (Exception e) { 89 86 OnExceptionOccurred(e); 90 87 } … … 104 101 base.Pause(); 105 102 pausePending = true; 106 CancellationTokenSource .Cancel();103 CancellationTokenSource?.Cancel(); 107 104 } 108 105 … … 112 109 base.Stop(); 113 110 if (ExecutionState == ExecutionState.Paused) OnStopped(); 114 else CancellationTokenSource .Cancel();111 else CancellationTokenSource?.Cancel(); 115 112 } 116 113 … … 127 124 initialized = true; 128 125 Run(cancellationToken); 129 } 130 finally { 126 } finally { 131 127 timer.Elapsed -= new System.Timers.ElapsedEventHandler(timer_Elapsed); 132 128 timer.Stop();
Note: See TracChangeset
for help on using the changeset viewer.