Changeset 7177 for trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs
- Timestamp:
- 12/12/11 16:25:17 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs/HiveTask.cs
r7132 r7177 121 121 hiveJob.IsControllable = value; 122 122 } 123 } 124 finally { 123 } finally { 125 124 childHiveTasksLock.ExitReadLock(); 126 125 } … … 136 135 try { 137 136 return childHiveTasks.AsReadOnly(); 138 } 139 finally { childHiveTasksLock.ExitReadLock(); } 137 } finally { childHiveTasksLock.ExitReadLock(); } 140 138 } 141 139 } … … 192 190 try { 193 191 this.childHiveTasks = cloner.Clone(original.childHiveTasks); 194 } 195 finally { original.childHiveTasksLock.ExitReadLock(); } 192 } finally { original.childHiveTasksLock.ExitReadLock(); } 196 193 this.syncTasksWithOptimizers = original.syncTasksWithOptimizers; 197 194 this.isFinishedTaskDownloaded = original.isFinishedTaskDownloaded; … … 242 239 try { 243 240 this.childHiveTasks.Add(hiveTask); 244 } 245 finally { childHiveTasksLock.ExitWriteLock(); } 241 } finally { childHiveTasksLock.ExitWriteLock(); } 246 242 } 247 243 … … 340 336 IsFinishedTaskDownloaded = false; 341 337 } 338 if (e.PropertyName == "Priority" && Task != null) { 339 foreach (var task in childHiveTasks) { 340 task.Task.Priority = Task.Priority; 341 } 342 } 342 343 } 343 344 #endregion … … 355 356 } 356 357 return jobs; 357 } 358 finally { childHiveTasksLock.ExitReadLock(); } 358 } finally { childHiveTasksLock.ExitReadLock(); } 359 359 } 360 360 … … 370 370 } 371 371 return null; 372 } 373 finally { childHiveTasksLock.ExitWriteLock(); } 372 } finally { childHiveTasksLock.ExitWriteLock(); } 374 373 } 375 374 … … 388 387 return result; 389 388 } 390 } 391 finally { childHiveTasksLock.ExitReadLock(); } 389 } finally { childHiveTasksLock.ExitReadLock(); } 392 390 } 393 391 return null; … … 404 402 child.RemoveByTaskId(jobId); 405 403 } 406 } 407 finally { childHiveTasksLock.ExitWriteLock(); } 404 } finally { childHiveTasksLock.ExitWriteLock(); } 408 405 } 409 406 … … 458 455 HiveServiceLocator.Instance.CallHiveService(s => s.PauseTask(child.task.Id)); 459 456 } 460 } 461 finally { childHiveTasksLock.ExitReadLock(); } 457 } finally { childHiveTasksLock.ExitReadLock(); } 462 458 } else { 463 459 HiveServiceLocator.Instance.CallHiveService(s => s.PauseTask(this.task.Id)); … … 472 468 HiveServiceLocator.Instance.CallHiveService(s => s.StopTask(child.task.Id)); 473 469 } 474 } 475 finally { childHiveTasksLock.ExitReadLock(); } 470 } finally { childHiveTasksLock.ExitReadLock(); } 476 471 } else { 477 472 HiveServiceLocator.Instance.CallHiveService(s => s.StopTask(this.task.Id)); -
trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs/OptimizerHiveTask.cs
r7142 r7177 65 65 Optimization.Experiment experiment = (Optimization.Experiment)ItemTask.Item; 66 66 foreach (IOptimizer childOpt in experiment.Optimizers) { 67 this.childHiveTasks.Add(new OptimizerHiveTask(childOpt)); 67 var optimizerHiveTask = new OptimizerHiveTask(childOpt); 68 optimizerHiveTask.Task.Priority = Task.Priority; //inherit priority from parent 69 this.childHiveTasks.Add(optimizerHiveTask); 68 70 } 69 71 } else if (ItemTask.Item is Optimization.BatchRun) { … … 71 73 if (batchRun.Optimizer != null) { 72 74 while (this.childHiveTasks.Count < batchRun.Repetitions) { 73 this.childHiveTasks.Add(new OptimizerHiveTask(batchRun.Optimizer)); 75 var optimizerHiveTask = new OptimizerHiveTask(batchRun.Optimizer); 76 optimizerHiveTask.Task.Priority = Task.Priority; 77 this.childHiveTasks.Add(optimizerHiveTask); 74 78 } 75 79 while (this.childHiveTasks.Count > batchRun.Repetitions) {
Note: See TracChangeset
for help on using the changeset viewer.