Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/03/11 18:08:42 (13 years ago)
Author:
ascheibe
Message:

#1233

  • HeartbeatManager: don't sleep while starting jobs
  • Executor: make Start() blocking
  • shutdown properly if an uncaught exception is thrown
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs

    r6110 r6112  
    3737    public Core Core { get; set; }
    3838    private Semaphore pauseStopSem = new Semaphore(0, 1);
     39    private Semaphore startJobSem = new Semaphore(0, 1);
    3940
    4041    public bool SendHeartbeatForExecutor { get; set; }
     
    8687        } else {
    8788          Job.Start();
    88 
     89          startJobSem.WaitOne();
    8990        }
    9091      }
     
    140141      Job.DeleteChildJobs += new EventHandler(Job_DeleteChildJobs);
    141142      Job.JobPaused += new EventHandler(Job_JobPaused);
     143      Job.JobStarted += new EventHandler(Job_JobStarted);
    142144    }
    143145
     
    149151      Job.DeleteChildJobs -= new EventHandler(Job_DeleteChildJobs);
    150152      Job.JobPaused -= new EventHandler(Job_JobPaused);
     153      Job.JobStarted -= new EventHandler(Job_JobStarted);
    151154    }
    152155
     
    237240    private void Job_JobPaused(object sender, EventArgs e) {
    238241      pauseStopSem.Release();
     242    }
     243
     244    void Job_JobStarted(object sender, EventArgs e) {
     245      startJobSem.Release();
    239246    }
    240247
Note: See TracChangeset for help on using the changeset viewer.