Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9429


Ignore:
Timestamp:
05/02/13 15:36:39 (12 years ago)
Author:
mkommend
Message:

#2024: Added support for CancellationToken in the ParallelEngine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ParallelEngine/3.3/ParallelEngine.cs

    r9326 r9429  
    7777      parallelOptions = new ParallelOptions();
    7878      parallelOptions.MaxDegreeOfParallelism = DegreeOfParallelism;
     79      parallelOptions.CancellationToken = cancellationToken;
    7980      Run(ExecutionStack);
    8081    }
     
    101102              Parallel.ForEach(stacks, parallelOptions, Run);
    102103            }
    103             catch (AggregateException ex) {
     104            catch (OperationCanceledException ex) {
    104105              OperationCollection remaining = new OperationCollection() { Parallel = true };
    105106              for (int i = 0; i < stacks.Length; i++) {
Note: See TracChangeset for help on using the changeset viewer.