Changeset 256 for trunk/sources/HeuristicLab.DistributedEngine
- Timestamp:
- 05/14/08 16:09:10 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DistributedEngine/JobManager.cs
r253 r256 65 65 stream.Close(); 66 66 byte[] zippedEngine = memStream.ToArray(); 67 memStream.Close(); 67 68 Guid currentEngineGuid = Guid.Empty; 68 69 bool success = false; … … 102 103 103 104 public IScope EndExecuteOperation(AtomicOperation operation) { 104 byte[] zippedResult = results[operation]; 105 byte[] zippedResult = null; 106 lock(dictionaryLock) { 107 zippedResult = results[operation]; 108 results.Remove(operation); 109 } 105 110 // restore the engine 106 GZipStream stream = new GZipStream(new MemoryStream(zippedResult), CompressionMode.Decompress);107 ProcessingEngine resultEngine = (ProcessingEngine)PersistenceManager.Load(stream);108 109 return resultEngine.InitialOperation.Scope;111 using(GZipStream stream = new GZipStream(new MemoryStream(zippedResult), CompressionMode.Decompress)) { 112 ProcessingEngine resultEngine = (ProcessingEngine)PersistenceManager.Load(stream); 113 return resultEngine.InitialOperation.Scope; 114 } 110 115 } 111 116
Note: See TracChangeset
for help on using the changeset viewer.