Changeset 9881 for branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/RobocodeEvaluator.cs
- Timestamp:
- 08/13/13 15:27:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/RobocodeEvaluator.cs
r9880 r9881 20 20 #endregion 21 21 22 using System.Threading;23 22 using HeuristicLab.Common; 24 23 using HeuristicLab.Core; … … 37 36 private const string TankProgramParameterName = "TankProgram"; 38 37 private const string RobocodePathParamaterName = "Path"; 39 40 //TODO: this should be removed41 public static SemaphoreSlim semaphore = new SemaphoreSlim(10);42 38 43 39 #region Parameters … … 65 61 66 62 public override IOperation Apply() { 67 semaphore.Wait();68 69 63 ISymbolicExpressionTree tree = TankProgramParameter.ActualValue; 70 64 string path = RobocodePathParameter.ActualValue.Value; 71 65 QualityParameter.ActualValue = new DoubleValue(Interpreter.EvaluateTankProgram(tree, path)); 72 73 semaphore.Release();74 66 75 67 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.