Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/12 17:57:40 (13 years ago)
Author:
ascheibe
Message:

#1722 fixed a NullReferenceException in Hive JobManager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveTasks/OptimizerHiveTask.cs

    r7259 r7782  
    3131namespace HeuristicLab.Clients.Hive {
    3232  public class OptimizerHiveTask : HiveTask<OptimizerTask> {
     33
     34    Object batchRunLocker = new Object();
    3335
    3436    #region Constructors and Cloning
     
    224226        batchRun.Optimizer = (IOptimizer)optimizerTask.Item; // only set the first optimizer as Optimizer. if every time the Optimizer would be set, the runs would be cleared each time
    225227      }
    226       foreach (IRun run in optimizerTask.Item.Runs) {
    227         if (!batchRun.Runs.Contains(run)) {
    228           run.Name = GetNewRunName(run, batchRun.Runs);
    229           batchRun.Runs.Add(run);
     228      lock (batchRunLocker) {
     229        foreach (IRun run in optimizerTask.Item.Runs) {
     230          if (!batchRun.Runs.Contains(run)) {
     231            run.Name = GetNewRunName(run, batchRun.Runs);
     232            batchRun.Runs.Add(run);
     233          }
    230234        }
    231235      }
Note: See TracChangeset for help on using the changeset viewer.