Changeset 5329 for branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager
- Timestamp:
- 01/18/11 17:57:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveJobDownloader.cs
r5181 r5329 58 58 abort = false; 59 59 tasks = new List<Task<HiveJob>>(); 60 TaskScheduler.UnobservedTaskException += new EventHandler<UnobservedTaskExceptionEventArgs>(TaskScheduler_UnobservedTaskException); 60 61 foreach (Guid jobId in jobIds) { 61 62 tasks.Add(Task<SerializedJob>.Factory.StartNew( … … 64 65 } 65 66 } 67 68 private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) { 69 e.SetObserved(); // evoid crash of process because task crashes. first exception found is handled in Results property 70 } 71 66 72 // use semaphore to ensure only few concurrenct connections and few SerializedJob objects in memory 67 73 private Semaphore downloadSemaphore = new Semaphore(2, 2);
Note: See TracChangeset
for help on using the changeset viewer.