- Timestamp:
- 11/23/15 21:18:26 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs
r12012 r13349 24 24 using System.Drawing; 25 25 using System.Linq; 26 using System.Threading; 27 using System.Threading.Tasks; 26 28 using HeuristicLab.Collections; 27 29 using HeuristicLab.Common; … … 202 204 Prepare(); 203 205 } 204 public virtual void Start() { 206 public void Start() { 207 StartAsync().Wait(); 208 } 209 public async Task StartAsync() { 210 await StartAsync(new CancellationToken()); 211 } 212 public virtual async Task StartAsync(CancellationToken cancellationToken) { 205 213 if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused)) 206 214 throw new InvalidOperationException(string.Format("Start not allowed in execution state \"{0}\".", ExecutionState));
Note: See TracChangeset
for help on using the changeset viewer.