Changeset 6519 for trunk/sources/HeuristicLab.Problems.ExternalEvaluation
- Timestamp:
- 07/06/11 20:52:53 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/CachedExternalEvaluator.cs
r6189 r6519 20 20 #endregion 21 21 22 23 22 using System.Threading; 24 23 using HeuristicLab.Common; … … 27 26 using HeuristicLab.Parameters; 28 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 namespace HeuristicLab.Problems.ExternalEvaluation { 30 30 -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationServiceClient.cs
r6470 r6519 52 52 [StorableConstructor] 53 53 protected EvaluationServiceClient(bool deserializing) : base(deserializing) { } 54 protected EvaluationServiceClient(EvaluationServiceClient original, Cloner cloner) : base(original, cloner) { 54 protected EvaluationServiceClient(EvaluationServiceClient original, Cloner cloner) 55 : base(original, cloner) { 55 56 RegisterEvents(); 56 } 57 } 57 58 public EvaluationServiceClient() 58 59 : base() { … … 83 84 result = (QualityMessage)Channel.Receive(QualityMessage.CreateBuilder()); 84 85 success = true; 85 } 86 catch (InvalidOperationException) { 86 } catch (InvalidOperationException) { 87 87 throw; 88 } 89 catch { 88 } catch { 90 89 if (tries >= maxTries) 91 90 throw; … … 104 103 Channel.Send(solution); 105 104 success = true; 106 } 107 catch (InvalidOperationException) { 105 } catch (InvalidOperationException) { 108 106 throw; 109 } 110 catch { 107 } catch { 111 108 if (tries >= maxTries) 112 109 throw; … … 123 120 try { 124 121 Channel.Open(); 125 } 126 catch (Exception e) { 122 } catch (Exception e) { 127 123 throw new InvalidOperationException(Name + ": The channel could not be opened.", e); 128 124 } … … 134 130 try { 135 131 message = (QualityMessage)Channel.Receive(QualityMessage.CreateBuilder()); 136 } 137 catch { } 132 } catch { } 138 133 ((Action<QualityMessage>)callback).Invoke(message); 139 134 } -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/EvaluationCache.cs
r6291 r6519 25 25 using System; 26 26 using System.Collections.Generic; 27 using System.Globalization; 28 using System.IO; 27 29 using System.Linq; 30 using System.Text.RegularExpressions; 28 31 using System.Threading; 29 32 using HeuristicLab.Common; … … 33 36 using HeuristicLab.Parameters; 34 37 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 35 using HeuristicLab.Analysis; 36 using System.IO; 37 using System.Globalization; 38 using System.Text.RegularExpressions; 38 39 39 namespace HeuristicLab.Problems.ExternalEvaluation { 40 40 … … 82 82 83 83 private HashSet<string> activeEvaluations = new HashSet<string>(); 84 private object cacheLock = new object(); 84 private object cacheLock = new object(); 85 85 #endregion 86 86 … … 126 126 127 127 #region Persistence 128 [Storable(Name ="Cache")]128 [Storable(Name = "Cache")] 129 129 private IEnumerable<KeyValuePair<string, double>> Cache_Persistence { 130 130 get { … … 194 194 bool lockTaken = false; 195 195 bool waited = false; 196 try { 196 try { 197 197 Monitor.Enter(cacheLock, ref lockTaken); 198 198 while (true) { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluator.cs
r6460 r6519 59 59 #region Fields 60 60 protected HashSet<IEvaluationServiceClient> activeClients = new HashSet<IEvaluationServiceClient>(); 61 protected object clientLock = new object(); 61 protected object clientLock = new object(); 62 62 #endregion 63 63
Note: See TracChangeset
for help on using the changeset viewer.