Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/11 17:16:37 (13 years ago)
Author:
epitzer
Message:

Added additional locks to improve concurrent persistence (#1544)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs

    r5445 r6356  
    4242
    4343    private static ConfigurationService instance;
     44    private static object locker = new object();
    4445    private readonly Dictionary<IFormat, Configuration> customConfigurations;
    4546
     
    6566    public static ConfigurationService Instance {
    6667      get {
    67         if (instance == null)
    68           instance = new ConfigurationService();
    69         return instance;
     68        lock (locker) {
     69          if (instance == null)
     70            instance = new ConfigurationService();
     71          return instance;
     72        }
    7073      }
    7174    }
Note: See TracChangeset for help on using the changeset viewer.