Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/06/17 15:23:57 (7 years ago)
Author:
pfleck
Message:

#2822 removed C# 6 feature and fixed enabled-state.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.cs

    r15408 r15409  
    2121
    2222using System;
    23 using System.Linq;
    2423using System.Threading;
    2524using HeuristicLab.Common;
     
    101100      base.Pause();
    102101      pausePending = true;
    103       CancellationTokenSource?.Cancel();
     102      if (CancellationTokenSource != null) CancellationTokenSource.Cancel();
    104103    }
    105104
     
    109108      base.Stop();
    110109      if (ExecutionState == ExecutionState.Paused) OnStopped();
    111       else CancellationTokenSource?.Cancel();
     110      else if (CancellationTokenSource != null) CancellationTokenSource.Cancel();
    112111    }
    113112
Note: See TracChangeset for help on using the changeset viewer.