Ignore:
Timestamp:
11/23/15 21:18:26 (4 years ago)
Author:
jkarder
Message:

#2258: added StartAsync to IExecutable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Async/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs

    r12504 r13349  
    2525using System.IO;
    2626using System.Linq;
     27using System.Threading;
     28using System.Threading.Tasks;
    2729using HeuristicLab.Clients.Access;
    2830using HeuristicLab.Collections;
     
    250252    }
    251253    public void Start() {
     254      StartAsync().Wait();
     255    }
     256    public async Task StartAsync() {
     257      await StartAsync(new CancellationToken());
     258    }
     259    public async Task StartAsync(CancellationToken cancellationToken) {
    252260      CheckUserPermissions();
    253261      if (!ClientInformation.Instance.ClientExists && storeRunsAutomatically) {
    254262        throw new MissingClientRegistrationException();
    255263      }
    256       Algorithm.Start();
     264      await Algorithm.StartAsync(cancellationToken);
    257265    }
    258266    public void Pause() {
Note: See TracChangeset for help on using the changeset viewer.