- Timestamp:
- 12/16/15 17:04:35 (9 years ago)
- Location:
- branches/PerformanceComparison
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison
- Property svn:ignore
-
old new 2 2 *.suo 3 3 *.user 4 .git 5 .gitignore
-
- Property svn:ignore
-
branches/PerformanceComparison/HeuristicLab.Optimization
- Property svn:mergeinfo changed
-
branches/PerformanceComparison/HeuristicLab.Optimization/3.3/MetaOptimizers/Experiment.cs
r12504 r13475 24 24 using System.Drawing; 25 25 using System.Linq; 26 using System.Threading; 26 27 using HeuristicLab.Collections; 27 28 using HeuristicLab.Common; … … 345 346 346 347 private readonly object locker = new object(); 348 private readonly object runsLocker = new object(); 347 349 private void optimizer_ExceptionOccurred(object sender, EventArgs<Exception> e) { 348 350 lock (locker) … … 350 352 } 351 353 private void optimizer_ExecutionTimeChanged(object sender, EventArgs e) { 352 lock (locker) 354 // only wait for maximally 100ms to acquire lock, otherwise return and don't update the execution time 355 var success = Monitor.TryEnter(locker, 100); 356 if (!success) return; 357 try { 353 358 ExecutionTime = Optimizers.Aggregate(TimeSpan.Zero, (t, o) => t + o.ExecutionTime); 359 } 360 finally { 361 Monitor.Exit(locker); 362 } 354 363 } 355 364 private void optimizer_Paused(object sender, EventArgs e) { … … 378 387 } 379 388 private void optimizer_Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) { 380 lock ( locker) {389 lock (runsLocker) { 381 390 Runs.RemoveRange(e.OldItems); 382 391 Runs.AddRange(e.Items); … … 384 393 } 385 394 private void optimizer_Runs_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) { 386 lock ( locker)395 lock (runsLocker) 387 396 Runs.AddRange(e.Items); 388 397 } 389 398 private void optimizer_Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) { 390 lock ( locker)399 lock (runsLocker) 391 400 Runs.RemoveRange(e.Items); 392 401 } -
branches/PerformanceComparison/HeuristicLab.Optimization/3.3/MetaOptimizers/TimeLimitRun.cs
r12627 r13475 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.