- Timestamp:
- 03/18/19 17:24:30 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.DebugEngine/3.3/DebugEngine.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 using System.Linq; 24 24 using System.Threading; 25 using System.Threading.Tasks;26 25 using HeuristicLab.Common; 27 26 using HeuristicLab.Core; … … 161 160 while (skipStackOperations && !(CurrentOperation is IAtomicOperation) && CanContinue) 162 161 ProcessNextOperation(true, cancellationTokenSource.Token); 163 } 164 catch (Exception ex) { 162 } catch (Exception ex) { 165 163 OnExceptionOccurred(ex); 166 164 } … … 174 172 } 175 173 176 public override void Start( ) {177 base.Start( );178 cancellationTokenSource = new CancellationTokenSource();174 public override void Start(CancellationToken cancellationToken) { 175 base.Start(cancellationToken); 176 cancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); 179 177 stopPending = false; 180 Task task = Task.Factory.StartNew(Run, cancellationTokenSource.Token, cancellationTokenSource.Token); 181 task.ContinueWith(t => { 182 try { 183 t.Wait(); 184 } 185 catch (AggregateException ex) { 186 try { 187 ex.Flatten().Handle(x => x is OperationCanceledException); 188 } 189 catch (AggregateException remaining) { 190 if (remaining.InnerExceptions.Count == 1) OnExceptionOccurred(remaining.InnerExceptions[0]); 191 else OnExceptionOccurred(remaining); 192 } 193 } 194 cancellationTokenSource.Dispose(); 195 cancellationTokenSource = null; 196 197 if (stopPending) ExecutionStack.Clear(); 198 if (stopPending || !CanContinue) OnStopped(); 199 else OnPaused(); 200 }); 201 } 202 178 179 try { 180 Run(cancellationTokenSource.Token); 181 } catch (OperationCanceledException) { 182 } catch (AggregateException ae) { 183 ae.FlattenAndHandle(new[] { typeof(OperationCanceledException) }, e => OnExceptionOccurred(e)); 184 } catch (Exception e) { 185 OnExceptionOccurred(e); 186 } 187 188 cancellationTokenSource.Dispose(); 189 cancellationTokenSource = null; 190 if (stopPending) ExecutionStack.Clear(); 191 if (stopPending || !CanContinue) OnStopped(); 192 else OnPaused(); 193 } 203 194 protected override void OnStarted() { 204 195 Log.LogMessage("Engine started"); … … 250 241 ProcessNextOperation(false, cancellationToken); 251 242 cancellationToken.ThrowIfCancellationRequested(); 252 } 253 finally { 243 } finally { 254 244 timer.Stop(); 255 245 ExecutionTime += DateTime.UtcNow - lastUpdateTime; … … 317 307 } 318 308 CurrentOperation = null; 319 } 320 catch (Exception ex) { 321 if (ex is OperationCanceledException) throw ex; 309 } catch (Exception ex) { 310 if (ex is OperationCanceledException) throw; 322 311 else throw new OperatorExecutionException(operation.Operator, ex); 323 312 } -
branches/2521_ProblemRefactoring/HeuristicLab.DebugEngine/3.3/ExecutionStack.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.DebugEngine/3.3/OperationChangedEventArgs.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.DebugEngine/3.3/OperationContent.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.DebugEngine/3.3/OperatorTrace.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.DebugEngine/3.3/Plugin.cs.frame
r13321 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 namespace HeuristicLab.DebugEngine { 25 25 26 [Plugin("HeuristicLab.DebugEngine", "3.3.1 3.$WCREV$")]26 [Plugin("HeuristicLab.DebugEngine", "3.3.15.$WCREV$")] 27 27 [PluginFile("HeuristicLab.DebugEngine-3.3.dll", PluginFileType.Assembly)] 28 28 [PluginDependency("HeuristicLab.Collections", "3.3")] -
branches/2521_ProblemRefactoring/HeuristicLab.DebugEngine/3.3/Properties/AssemblyInfo.cs.frame
r13321 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 5HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2018 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 54 54 // by using the '*' as shown below: 55 55 [assembly: AssemblyVersion("3.3.0.0")] 56 [assembly: AssemblyFileVersion("3.3.1 3.$WCREV$")]56 [assembly: AssemblyFileVersion("3.3.15.$WCREV$")] -
branches/2521_ProblemRefactoring/HeuristicLab.DebugEngine/3.3/Utils.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.