Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/28/17 16:47:42 (7 years ago)
Author:
jkarder
Message:

#2258: merged r15287 into stable

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs

    r15082 r15292  
    2020#endregion
    2121
     22using System.Threading;
     23using System.Threading.Tasks;
    2224using HeuristicLab.Clients.Access;
    2325using HeuristicLab.Collections;
     
    6769            try {
    6870              algorithm.Problem = problem;
    69             }
    70             catch (ArgumentException) {
     71            } catch (ArgumentException) {
    7172              algorithm.Problem = null;
    7273            }
     
    250251    }
    251252    public void Start() {
     253      Start(CancellationToken.None);
     254    }
     255    public void Start(CancellationToken cancellationToken) {
    252256      CheckUserPermissions();
    253257      if (!ClientInformation.Instance.ClientExists && storeRunsAutomatically) {
    254258        throw new MissingClientRegistrationException();
    255259      }
    256       Algorithm.Start();
     260      Algorithm.Start(cancellationToken);
     261    }
     262    public async Task StartAsync() { await StartAsync(CancellationToken.None); }
     263    public async Task StartAsync(CancellationToken cancellationToken) {
     264      await AsyncHelper.DoAsync(Start, cancellationToken);
    257265    }
    258266    public void Pause() {
Note: See TracChangeset for help on using the changeset viewer.