Changeset 413 for trunk/sources/HeuristicLab.DistributedEngine
- Timestamp:
- 07/31/08 10:07:09 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DistributedEngine/DistributedEngine.cs
r412 r413 127 127 } 128 128 } 129 130 CompositeOperation canceledOperations = new CompositeOperation(); 131 canceledOperations.ExecuteInParallel = true; 129 132 // retrieve results and merge into scope-tree 130 133 foreach(AtomicOperation parOperation in compositeOperation.Operations) { 131 134 ProcessingEngine resultEngine = jobManager.EndExecuteOperation(parOperation); 132 135 if(resultEngine.Canceled) { 133 // When the engine was canceled because of a problem at the client we can try to execute the steps locally. 134 // If they also fail the (local) distributued-engine will be aborted and we will see an error-message. 135 // so just push the original parallel operation back on the stack to force local execution. 136 ExecutionStack.Push(parOperation); 136 ThreadPool.QueueUserWorkItem(delegate(object state) { OnExceptionOccurred(new JobExecutionException(resultEngine.ErrorMessage)); }); 137 canceledOperations.AddOperation(parOperation); 137 138 } else { 138 139 // if everything went fine we can merge the results into our local scope-tree 139 140 MergeScope(parOperation.Scope, resultEngine.InitialOperation.Scope); 140 141 } 142 } 143 144 if(canceledOperations.Operations.Count > 0) { 145 myExecutionStack.Push(canceledOperations); 146 Abort(); 141 147 } 142 148 } catch(Exception e) {
Note: See TracChangeset
for help on using the changeset viewer.