Changeset 6760 for branches/PersistenceSpeedUp/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluator.cs
- Timestamp:
- 09/14/11 13:59:25 (13 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/PersistenceSpeedUp/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluator.cs
r6189 r6760 60 60 protected HashSet<IEvaluationServiceClient> activeClients = new HashSet<IEvaluationServiceClient>(); 61 61 protected object clientLock = new object(); 62 protected AutoResetEvent clientAvailable = new AutoResetEvent(false);63 62 #endregion 64 63 … … 109 108 client = Clients.CheckedItems.FirstOrDefault(c => !activeClients.Contains(c)); 110 109 while (client == null && Clients.Count > 0) { 111 Monitor.Exit(clientLock); 112 clientAvailable.WaitOne(); 113 Monitor.Enter(clientLock); 110 Monitor.Wait(clientLock); 114 111 client = Clients.CheckedItems.FirstOrDefault(c => !activeClients.Contains(c)); 115 112 } … … 122 119 lock (clientLock) { 123 120 activeClients.Remove(client); 124 clientAvailable.Set();121 Monitor.PulseAll(clientLock); 125 122 } 126 123 }
Note: See TracChangeset
for help on using the changeset viewer.