Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/18/15 13:55:01 (8 years ago)
Author:
mkommend
Message:

#2442: Adapted locking in the symbolic expression trees interpreters when incrementing the evaluated solutions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs

    r13248 r13251  
    150150    #endregion
    151151
     152    private readonly object syncRoot = new object();
    152153    public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, IDataset dataset, IEnumerable<int> rows) {
    153154      if (CheckExpressionsWithIntervalArithmetic)
    154155        throw new NotSupportedException("Interval arithmetic is not yet supported in the symbolic data analysis interpreter.");
    155156
    156       EvaluatedSolutions++; // increment the evaluated solutions counter
     157      lock (syncRoot) {
     158        EvaluatedSolutions++; // increment the evaluated solutions counter
     159      }
    157160      var state = PrepareInterpreterState(tree, dataset);
    158161
Note: See TracChangeset for help on using the changeset viewer.