Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/18/14 13:34:37 (10 years ago)
Author:
ascheibe
Message:

merged only Hive changes from trunk into branch

Location:
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Clients.Hive

    • Property svn:mergeinfo set to (toggle deleted branches)
      /trunk/sources/HeuristicLab.Clients.Hivemergedeligible
      /branches/Algorithms.GradientDescent/HeuristicLab.Clients.Hive5516-5520
      /branches/Benchmarking/sources/HeuristicLab.Clients.Hive6917-7005
      /branches/CloningRefactoring/HeuristicLab.Clients.Hive4656-4721
      /branches/DataAnalysis Refactoring/HeuristicLab.Clients.Hive5471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Clients.Hive5815-6180
      /branches/DataAnalysis/HeuristicLab.Clients.Hive4458-4459,​4462,​4464
      /branches/GP.Grammar.Editor/HeuristicLab.Clients.Hive6284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Clients.Hive5060
      /branches/NET40/sources/HeuristicLab.Clients.Hive5138-5162
      /branches/ParallelEngine/HeuristicLab.Clients.Hive5175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Clients.Hive7568-7810
      /branches/QAPAlgorithms/HeuristicLab.Clients.Hive6350-6627
      /branches/Restructure trunk solution/HeuristicLab.Clients.Hive6828
      /branches/RuntimeOptimizer/HeuristicLab.Clients.Hive8943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.Clients.Hive7787-8333
      /branches/SlaveShutdown/HeuristicLab.Clients.Hive8944-8956
      /branches/SuccessProgressAnalysis/HeuristicLab.Clients.Hive5370-5682
      /branches/Trunk/HeuristicLab.Clients.Hive6829-6865
      /branches/UnloadJobs/HeuristicLab.Clients.Hive9168-9215
      /branches/VNS/HeuristicLab.Clients.Hive5594-5752
      /branches/histogram/HeuristicLab.Clients.Hive5959-6341
  • branches/HiveStatistics/sources/HeuristicLab.Clients.Hive/3.3/TaskDownloader.cs

    r11203 r11204  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2424using System.Linq;
    2525using System.Threading;
    26 using HeuristicLab.Clients.Hive.Jobs;
    2726using HeuristicLab.Common;
    2827
     
    7978
    8079    public TaskDownloader(IEnumerable<Guid> jobIds) {
    81       this.taskIds = jobIds;
    82       this.taskDownloader = new ConcurrentTaskDownloader<ItemTask>(Settings.Default.MaxParallelDownloads, Settings.Default.MaxParallelDownloads);
    83       this.taskDownloader.ExceptionOccured += new EventHandler<EventArgs<Exception>>(taskDownloader_ExceptionOccured);
    84       this.results = new Dictionary<Guid, HiveTask>();
     80      taskIds = jobIds;
     81      taskDownloader = new ConcurrentTaskDownloader<ItemTask>(Settings.Default.MaxParallelDownloads, Settings.Default.MaxParallelDownloads);
     82      taskDownloader.ExceptionOccured += new EventHandler<EventArgs<Exception>>(taskDownloader_ExceptionOccured);
     83      results = new Dictionary<Guid, HiveTask>();
    8584    }
    8685
     
    8887      foreach (Guid taskId in taskIds) {
    8988        taskDownloader.DownloadTaskDataAndTask(taskId,
    90           (localJob, itemJob) => {
    91             if (localJob != null && itemJob != null) {
    92               HiveTask hiveTask;
    93               if (itemJob is OptimizerTask) {
    94                 hiveTask = new OptimizerHiveTask((OptimizerTask)itemJob);
    95               } else {
    96                 hiveTask = new HiveTask(itemJob, true);
    97               }
    98               hiveTask.Task = localJob;
     89          (localTask, itemTask) => {
     90            if (localTask != null && itemTask != null) {
     91              HiveTask hiveTask = itemTask.CreateHiveTask();
     92              hiveTask.Task = localTask;
    9993              try {
    10094                resultsLock.EnterWriteLock();
    101                 this.results.Add(localJob.Id, hiveTask);
     95                results.Add(localTask.Id, hiveTask);
    10296              }
    10397              finally { resultsLock.ExitWriteLock(); }
     
    113107    public event EventHandler<EventArgs<Exception>> ExceptionOccured;
    114108    private void OnExceptionOccured(Exception exception) {
    115       this.exceptionOccured = true;
    116       this.currentException = exception;
     109      exceptionOccured = true;
     110      currentException = exception;
    117111      var handler = ExceptionOccured;
    118112      if (handler != null) handler(this, new EventArgs<Exception>(exception));
Note: See TracChangeset for help on using the changeset viewer.