Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1211


Ignore:
Timestamp:
02/10/09 12:56:28 (16 years ago)
Author:
gkronber
Message:

merged r1210 from CEDMA refactoring branch into trunk #488 (Lazy compilation pattern in ProgrammableOperator is not thread-safe and doesn't work in thread parallel engines)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Programmable/ProgrammableOperator.cs

    r895 r1211  
    5454      }
    5555    }
     56
     57    private object syncRoot = new object();
    5658
    5759    public ProgrammableOperator() {
     
    152154
    153155    public override IOperation Apply(IScope scope) {
    154       if (executeMethod == null) {
    155         Compile();
     156      lock (syncRoot) {
     157        if (executeMethod == null) {
     158          Compile();
     159        }
    156160      }
    157161
Note: See TracChangeset for help on using the changeset viewer.