Changeset 32 for trunk/sources/HeuristicLab.DistributedEngine
- Timestamp:
- 02/29/08 19:22:27 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DistributedEngine/DistributedEngine.cs
r24 r32 33 33 namespace HeuristicLab.DistributedEngine { 34 34 public class DistributedEngine : EngineBase, IEditable { 35 // currently executed operators36 private IOperator[] currentOperators;37 private int operatorIndex;38 35 private IGridServer server; 36 private Dictionary<Guid, AtomicOperation> runningEngines = new Dictionary<Guid, AtomicOperation>(); 39 37 40 38 private string serverAddress; … … 47 45 } 48 46 } 49 50 public DistributedEngine() {51 currentOperators = new IOperator[1000];52 }53 54 47 55 48 public override object Clone(IDictionary<Guid, object> clonedObjects) { … … 84 77 public override void Abort() { 85 78 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); 89 81 } 90 82 } 91 83 92 84 protected override void ProcessNextOperation() { 93 operatorIndex = 1;94 85 ProcessNextOperation(myExecutionStack, 0); 95 86 } … … 100 91 IOperation next = null; 101 92 try { 102 currentOperators[currentOperatorIndex] = atomicOperation.Operator;103 93 next = atomicOperation.Operator.Execute(atomicOperation.Scope); 104 94 } catch(Exception ex) { … … 115 105 CompositeOperation compositeOperation = (CompositeOperation)operation; 116 106 if(compositeOperation.ExecuteInParallel) { 117 Dictionary<Guid, AtomicOperation> runningEngines = new Dictionary<Guid, AtomicOperation>();118 107 foreach(AtomicOperation parOperation in compositeOperation.Operations) { 119 108 ProcessingEngine engine = new ProcessingEngine(OperatorGraph, GlobalScope, parOperation); // OperatorGraph not needed?
Note: See TracChangeset
for help on using the changeset viewer.