Changeset 804 for trunk/sources/HeuristicLab.Hive.Client.Core
- Timestamp:
- 11/23/08 00:11:22 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r798 r804 35 35 using HeuristicLab.Hive.Contracts.BusinessObjects; 36 36 using HeuristicLab.Hive.Contracts; 37 using System.Runtime.Remoting.Messaging; 37 38 38 39 39 40 namespace HeuristicLab.Hive.Client.Core { 40 41 public class Core { 42 43 public delegate string GetASnapshotDelegate(); 41 44 42 45 Dictionary<long, Executor> engines = new Dictionary<long, Executor>(); … … 120 123 break; 121 124 case MessageContainer.MessageType.SnapshotReady: 122 engines[container.JobId].GetSnapshot(); 125 //Grabbing of the snapshot will need some time, so let's make this functun async 126 GetASnapshotDelegate ssd = new GetASnapshotDelegate(engines[container.JobId].GetSnapshot); 127 ssd.BeginInvoke(new AsyncCallback(SnapshotReceived), null); 128 //engines[container.JobId].GetSnapshot(); 123 129 break; 124 130 … … 138 144 break; 139 145 } 146 } 147 148 void SnapshotReceived(IAsyncResult res) { 149 AsyncResult ar = (AsyncResult) res; 150 GetASnapshotDelegate gss = (GetASnapshotDelegate) ar.AsyncDelegate; 151 String objectRepr = gss.EndInvoke(res); 140 152 } 141 153
Note: See TracChangeset
for help on using the changeset viewer.