Changeset 15232 for branches/Async/HeuristicLab.Algorithms.Benchmarks
- Timestamp:
- 07/13/17 15:53:56 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async/HeuristicLab.Algorithms.Benchmarks/3.3/BenchmarkAlgorithm.cs
r15065 r15232 312 312 } catch (OperationCanceledException) { 313 313 } catch (AggregateException ae) { 314 if (ae.InnerExceptions.Count == 1) OnExceptionOccurred(ae.InnerExceptions[0]); 315 else OnExceptionOccurred(ae); 314 OnExceptionOccurred(ae.InnerExceptions.SingleOrDefault() ?? ae); 316 315 } catch (Exception e) { 317 316 OnExceptionOccurred(e); … … 324 323 public async Task StartAsync() { await StartAsync(CancellationToken.None); } 325 324 public async Task StartAsync(CancellationToken cancellationToken) { 326 await Task.Factory.StartNew((ct) => Start((CancellationToken)ct), cancellationToken, cancellationToken);325 await AsyncHelper.DoAsync(Start, cancellationToken); 327 326 } 328 327
Note: See TracChangeset
for help on using the changeset viewer.