Changeset 9902
- Timestamp:
- 08/23/13 09:39:28 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive/3.3/ConcurrentTaskDownloader.cs
r9456 r9902 46 46 47 47 task.ContinueWith((x) => OnTaskFinished(x, onFinishedAction), TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.OnlyOnRanToCompletion); 48 task.ContinueWith((x) => OnTaskFailed(x , onFinishedAction), TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.OnlyOnFaulted);48 task.ContinueWith((x) => OnTaskFailed(x), TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.OnlyOnFaulted); 49 49 } 50 50 … … 55 55 56 56 task.ContinueWith((x) => OnTaskFinished(x, onFinishedAction), TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.OnlyOnRanToCompletion); 57 task.ContinueWith((x) => OnTaskFailed(x , onFinishedAction), TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.OnlyOnFaulted);57 task.ContinueWith((x) => OnTaskFailed(x), TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.OnlyOnFaulted); 58 58 } 59 59 … … 61 61 onFinishedAction(task.Result.Item1, task.Result.Item2); 62 62 } 63 private void OnTaskFailed(Task<Tuple<Task, T>> task , Action<Task, T> onFinishedAction) {63 private void OnTaskFailed(Task<Tuple<Task, T>> task) { 64 64 task.Exception.Flatten().Handle((e) => { return true; }); 65 65 OnExceptionOccured(task.Exception.Flatten()); 66 onFinishedAction(task.Result.Item1, null);67 66 } 68 67
Note: See TracChangeset
for help on using the changeset viewer.