Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/06/17 14:13:21 (7 years ago)
Author:
pfleck
Message:

#2822 Merged branch to trunk

Location:
trunk/sources/HeuristicLab.Optimization
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization

  • trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.cs

    r15367 r15408  
    8080      try {
    8181        Run((object)cancellationTokenSource.Token);
    82       }
    83       catch (OperationCanceledException) {
    84       }
    85       catch (AggregateException ae) {
     82      } catch (OperationCanceledException) {
     83      } catch (AggregateException ae) {
    8684        ae.FlattenAndHandle(new[] { typeof(OperationCanceledException) }, e => OnExceptionOccurred(e));
    87       }
    88       catch (Exception e) {
     85      } catch (Exception e) {
    8986        OnExceptionOccurred(e);
    9087      }
     
    104101      base.Pause();
    105102      pausePending = true;
    106       CancellationTokenSource.Cancel();
     103      CancellationTokenSource?.Cancel();
    107104    }
    108105
     
    112109      base.Stop();
    113110      if (ExecutionState == ExecutionState.Paused) OnStopped();
    114       else CancellationTokenSource.Cancel();
     111      else CancellationTokenSource?.Cancel();
    115112    }
    116113
     
    127124        initialized = true;
    128125        Run(cancellationToken);
    129       }
    130       finally {
     126      } finally {
    131127        timer.Elapsed -= new System.Timers.ElapsedEventHandler(timer_Elapsed);
    132128        timer.Stop();
Note: See TracChangeset for help on using the changeset viewer.