Changeset 27
- Timestamp:
- 02/28/08 12:21:16 (17 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DistributedEngine/HeuristicLab.DistributedEngine.csproj
r4 r27 72 72 <Name>HeuristicLab.PluginInfrastructure</Name> 73 73 </ProjectReference> 74 <ProjectReference Include="..\HeuristicLab.ThreadParallelEngine\HeuristicLab.ThreadParallelEngine.csproj">75 <Project>{6E757D0E-20F9-4E89-AF06-D7DA256870DB}</Project>76 <Name>HeuristicLab.ThreadParallelEngine</Name>77 </ProjectReference>78 74 </ItemGroup> 79 75 <ItemGroup> -
trunk/sources/HeuristicLab.DistributedEngine/HeuristicLabDistributedEnginePlugin.cs
r14 r27 30 30 [Dependency(Dependency = "HeuristicLab.Core")] 31 31 [Dependency(Dependency = "HeuristicLab.Grid")] 32 [Dependency(Dependency = "HeuristicLab.ThreadParallelEngine")]33 32 public class HeuristicLabDistributedEnginePlugin : PluginBase { 34 33 } -
trunk/sources/HeuristicLab.Grid/HeuristicLab.Grid.csproj
r4 r27 83 83 <Name>HeuristicLab.PluginInfrastructure</Name> 84 84 </ProjectReference> 85 <ProjectReference Include="..\HeuristicLab.ThreadParallelEngine\HeuristicLab.ThreadParallelEngine.csproj">86 <Project>{6E757D0E-20F9-4E89-AF06-D7DA256870DB}</Project>87 <Name>HeuristicLab.ThreadParallelEngine</Name>88 </ProjectReference>89 85 </ItemGroup> 90 86 <ItemGroup> -
trunk/sources/HeuristicLab.Grid/HeuristicLabGridPlugin.cs
r2 r27 30 30 [PluginFile(Filename = "HeuristicLab.Grid.dll", Filetype = PluginFileType.Assembly)] 31 31 [Dependency(Dependency = "HeuristicLab.Core")] 32 [Dependency(Dependency = "HeuristicLab.ThreadParallelEngine")]33 32 public class HeuristicLabGridPlugin : PluginBase { 34 33 } -
trunk/sources/HeuristicLab.Grid/ProcessingEngine.cs
r2 r27 26 26 using HeuristicLab.Core; 27 27 using System.Xml; 28 using System.Threading; 28 29 29 30 namespace HeuristicLab.Grid { 30 public class ProcessingEngine : ThreadParallelEngine.ThreadParallelEngine { 31 31 public class ProcessingEngine : EngineBase { 32 32 private AtomicOperation initialOperation; 33 33 public AtomicOperation InitialOperation { … … 56 56 initialOperation = (AtomicOperation)PersistenceManager.Restore(node.SelectSingleNode("InitialOperation"), restoredObjects); 57 57 } 58 59 protected override void ProcessNextOperation() { 60 IOperation operation = myExecutionStack.Pop(); 61 if(operation is AtomicOperation) { 62 AtomicOperation atomicOperation = (AtomicOperation)operation; 63 IOperation next = null; 64 try { 65 next = atomicOperation.Operator.Execute(atomicOperation.Scope); 66 } catch(Exception ex) { 67 // push operation on stack again 68 myExecutionStack.Push(atomicOperation); 69 Abort(); 70 ThreadPool.QueueUserWorkItem(delegate(object state) { OnExceptionOccurred(ex); }); 71 } 72 if(next != null) 73 myExecutionStack.Push(next); 74 OnOperationExecuted(atomicOperation); 75 if(atomicOperation.Operator.Breakpoint) Abort(); 76 } else if(operation is CompositeOperation) { 77 CompositeOperation compositeOperation = (CompositeOperation)operation; 78 for(int i = compositeOperation.Operations.Count - 1; i >= 0; i--) 79 myExecutionStack.Push(compositeOperation.Operations[i]); 80 } 81 } 58 82 } 59 83 }
Note: See TracChangeset
for help on using the changeset viewer.