Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/21/11 22:51:59 (13 years ago)
Author:
abeham
Message:

#1333

  • Removed changes to IntCounter that would make it thread-safe, if a thread-safe operator is needed a separate one should be implemented
  • Moved counting of evaluated solutions out of the parallel region
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators/3.3/IntCounter.cs

    r5208 r5352  
    3333  [StorableClass]
    3434  public sealed class IntCounter : SingleSuccessorOperator {
    35     private object locker = new object();
    3635
    3736    public LookupParameter<IntValue> ValueParameter {
     
    6261
    6362    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;
    6865      return base.Apply();
    6966    }
Note: See TracChangeset for help on using the changeset viewer.