Changeset 5352 for trunk/sources/HeuristicLab.Operators
- Timestamp:
- 01/21/11 22:51:59 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators/3.3/IntCounter.cs
r5208 r5352 33 33 [StorableClass] 34 34 public sealed class IntCounter : SingleSuccessorOperator { 35 private object locker = new object();36 35 37 36 public LookupParameter<IntValue> ValueParameter { … … 62 61 63 62 public override IOperation Apply() { 64 lock (locker) { 65 if (ValueParameter.ActualValue == null) ValueParameter.ActualValue = new IntValue(); 66 ValueParameter.ActualValue.Value += IncrementParameter.ActualValue.Value; 67 } 63 if (ValueParameter.ActualValue == null) ValueParameter.ActualValue = new IntValue(); 64 ValueParameter.ActualValue.Value += IncrementParameter.ActualValue.Value; 68 65 return base.Apply(); 69 66 }
Note: See TracChangeset
for help on using the changeset viewer.