Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/14/15 14:40:46 (9 years ago)
Author:
gkronber
Message:

#2061: added try-finally-block

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/crossvalidation-2434/HeuristicLab.Optimization/3.3/MetaOptimizers/Experiment.cs

    r12949 r12950  
    355355      var success = Monitor.TryEnter(locker, 100);
    356356      if (!success) return;
    357       ExecutionTime = Optimizers.Aggregate(TimeSpan.Zero, (t, o) => t + o.ExecutionTime);
    358       Monitor.Exit(locker);
     357      try {
     358        ExecutionTime = Optimizers.Aggregate(TimeSpan.Zero, (t, o) => t + o.ExecutionTime);
     359      }
     360      finally {
     361        Monitor.Exit(locker);
     362      }
    359363    }
    360364    private void optimizer_Paused(object sender, EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.