Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/29/08 19:22:27 (16 years ago)
Author:
gkronber
Message:

worked on #2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DistributedEngine/DistributedEngine.cs

    r24 r32  
    3333namespace HeuristicLab.DistributedEngine {
    3434  public class DistributedEngine : EngineBase, IEditable {
    35     // currently executed operators
    36     private IOperator[] currentOperators;
    37     private int operatorIndex;
    3835    private IGridServer server;
     36    private Dictionary<Guid, AtomicOperation> runningEngines = new Dictionary<Guid, AtomicOperation>();
    3937
    4038    private string serverAddress;
     
    4745      }
    4846    }
    49 
    50     public DistributedEngine() {
    51       currentOperators = new IOperator[1000];
    52     }
    53 
    5447
    5548    public override object Clone(IDictionary<Guid, object> clonedObjects) {
     
    8477    public override void Abort() {
    8578      base.Abort();
    86       for(int i = 0; i < currentOperators.Length; i++) {
    87         if(currentOperators[i] != null)
    88           currentOperators[i].Abort();
     79      foreach(Guid engineGuid in runningEngines.Keys) {
     80        server.AbortEngine(engineGuid);
    8981      }
    9082    }
    9183
    9284    protected override void ProcessNextOperation() {
    93       operatorIndex = 1;
    9485      ProcessNextOperation(myExecutionStack, 0);
    9586    }
     
    10091        IOperation next = null;
    10192        try {
    102           currentOperators[currentOperatorIndex] = atomicOperation.Operator;
    10393          next = atomicOperation.Operator.Execute(atomicOperation.Scope);
    10494        } catch(Exception ex) {
     
    115105        CompositeOperation compositeOperation = (CompositeOperation)operation;
    116106        if(compositeOperation.ExecuteInParallel) {
    117           Dictionary<Guid, AtomicOperation> runningEngines = new Dictionary<Guid, AtomicOperation>();
    118107          foreach(AtomicOperation parOperation in compositeOperation.Operations) {
    119108            ProcessingEngine engine = new ProcessingEngine(OperatorGraph, GlobalScope, parOperation); // OperatorGraph not needed?
Note: See TracChangeset for help on using the changeset viewer.