Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/08/14 13:15:12 (10 years ago)
Author:
bburlacu
Message:

#2234: Fixed thread synchronisation bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs

    r11361 r11427  
    3434namespace HeuristicLab.Algorithms.DataAnalysis {
    3535  public class SupportVectorMachineUtil {
     36    private static readonly object locker = new object();
     37
     38
    3639    /// <summary>
    3740    /// Transforms <paramref name="problemData"/> into a data structure as needed by libSVM.
     
    106109
    107110        double testMse = CalculateCrossValidationPartitions(partitions, parameters);
    108         if (testMse < mse.Value) {
    109           lock (mse) {
     111        lock (locker) {
     112          if (testMse < mse.Value) {
    110113            mse.Value = testMse;
    111114            bestParam = (svm_parameter)parameters.Clone();
Note: See TracChangeset for help on using the changeset viewer.