Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.Designer.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.Designer.cs	(revision 15751)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.Designer.cs	(revision 15752)
@@ -55,5 +55,4 @@
       this.dataPartitionComboBox = new System.Windows.Forms.ComboBox();
       this.variableImactsArrayView = new HeuristicLab.Data.Views.StringConvertibleArrayView();
-      this.backgroundWorker = new System.ComponentModel.BackgroundWorker();
       this.SuspendLayout();
       // 
@@ -170,9 +169,4 @@
       this.variableImactsArrayView.Size = new System.Drawing.Size(706, 278);
       this.variableImactsArrayView.TabIndex = 2;
-      // 
-      // backgroundWorker
-      // 
-      this.backgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker_DoWork);
-      this.backgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker_RunWorkerCompleted);
       // 
       // RegressionSolutionVariableImpactsView
@@ -192,4 +186,5 @@
       this.Name = "RegressionSolutionVariableImpactsView";
       this.Size = new System.Drawing.Size(712, 365);
+      this.VisibleChanged += new System.EventHandler(this.RegressionSolutionVariableImpactsView_VisibleChanged);
       this.ResumeLayout(false);
       this.PerformLayout();
@@ -209,5 +204,4 @@
     private System.Windows.Forms.ComboBox sortByComboBox;
     private System.Windows.Forms.CheckBox ascendingCheckBox;
-    private System.ComponentModel.BackgroundWorker backgroundWorker;
   }
 }
Index: /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs
===================================================================
--- /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs	(revision 15751)
+++ /trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs	(revision 15752)
@@ -23,4 +23,6 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
 using HeuristicLab.Common;
 using HeuristicLab.Data;
@@ -32,11 +34,4 @@
   public partial class RegressionSolutionVariableImpactsView : DataAnalysisSolutionEvaluationView {
     #region Nested Types
-    private class BackgroundWorkerArguments {
-      internal MainForm.WindowsForms.MainForm mainForm;
-      internal RegressionSolutionVariableImpactsCalculator.ReplacementMethodEnum replMethod;
-      internal RegressionSolutionVariableImpactsCalculator.FactorReplacementMethodEnum factorReplMethod;
-      internal RegressionSolutionVariableImpactsCalculator.DataPartitionEnum dataPartition;
-    }
-
     private enum SortingCriteria {
       ImpactValue,
@@ -48,4 +43,5 @@
     #region Fields
     private Dictionary<string, double> rawVariableImpacts = new Dictionary<string, double>();
+    private Thread thread;
     #endregion
 
@@ -101,15 +97,22 @@
         variableImactsArrayView.Content = null;
       } else {
-        StartBackgroundWorker();
-      }
+        UpdateVariableImpact();
+      }
+    }
+
+    private void RegressionSolutionVariableImpactsView_VisibleChanged(object sender, EventArgs e) {
+      if (thread == null) { return; }
+
+      if (thread.IsAlive) { thread.Abort(); }
+      thread = null;
     }
 
 
     private void dataPartitionComboBox_SelectedIndexChanged(object sender, EventArgs e) {
-      StartBackgroundWorker();
+      UpdateVariableImpact();
     }
 
     private void replacementComboBox_SelectedIndexChanged(object sender, EventArgs e) {
-      StartBackgroundWorker();
+      UpdateVariableImpact();
     }
 
@@ -139,35 +142,8 @@
     }
 
-
-    private void backgroundWorker_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) {
-      variableImactsArrayView.Caption = Content.Name + " Variable Impacts";
-
-      var argument = e.Argument as BackgroundWorkerArguments;
-      if (!(argument is BackgroundWorkerArguments)) {
-        throw new ArgumentException("Argument for Backgroundworker must be of type BackgroundworkerArguments");
-      }
-
-      argument.mainForm.AddOperationProgressToView(this, "Calculating variable impacts for " + Content.Name);
-      try {
-        //Remember the original ordering of the variables
-        var impacts = RegressionSolutionVariableImpactsCalculator.CalculateImpacts(Content, argument.dataPartition, argument.replMethod, argument.factorReplMethod);
-        var problemData = Content.ProblemData;
-        var inputvariables = new HashSet<string>(problemData.AllowedInputVariables.Union(Content.Model.VariablesUsedForPrediction));
-        var originalVariableOrdering = problemData.Dataset.VariableNames.Where(v => inputvariables.Contains(v)).Where(problemData.Dataset.VariableHasType<double>).ToList();
-
-        rawVariableImpacts.Clear();
-        originalVariableOrdering.ForEach(v => rawVariableImpacts.Add(v, impacts.First(vv => vv.Item1 == v).Item2));
-      } finally {
-        argument.mainForm.RemoveOperationProgressFromView(this);
-      }
-    }
-
-    private void backgroundWorker_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e) {
-      UpdateDataOrdering();
-    }
     #endregion
 
     #region Helper Methods   
-    private void StartBackgroundWorker() {
+    private void UpdateVariableImpact() {
       //Check if the selection is valid
       if (Content == null) { return; }
@@ -181,14 +157,24 @@
       var factorReplMethod = (RegressionSolutionVariableImpactsCalculator.FactorReplacementMethodEnum)factorVarReplComboBox.Items[factorVarReplComboBox.SelectedIndex];
       var dataPartition = (RegressionSolutionVariableImpactsCalculator.DataPartitionEnum)dataPartitionComboBox.SelectedItem;
-      var args = new BackgroundWorkerArguments() {
-        mainForm = mainForm,
-        replMethod = replMethod,
-        factorReplMethod = factorReplMethod,
-        dataPartition = dataPartition
-      };
-
-      //Let the backgroundWorker do his job (unless he's already running)
-      //fholzing: Possible bug -> A ContentChanged won't update the data if the backgroundworker is already running
-      if (!backgroundWorker.IsBusy) { backgroundWorker.RunWorkerAsync(args); }
+
+      variableImactsArrayView.Caption = Content.Name + " Variable Impacts";
+
+      mainForm.AddOperationProgressToView(this, "Calculating variable impacts for " + Content.Name);
+
+      Task.Factory.StartNew(() => {
+        thread = Thread.CurrentThread;
+        //Remember the original ordering of the variables
+        var impacts = RegressionSolutionVariableImpactsCalculator.CalculateImpacts(Content, dataPartition, replMethod, factorReplMethod);
+        var problemData = Content.ProblemData;
+        var inputvariables = new HashSet<string>(problemData.AllowedInputVariables.Union(Content.Model.VariablesUsedForPrediction));
+        var originalVariableOrdering = problemData.Dataset.VariableNames.Where(v => inputvariables.Contains(v)).Where(problemData.Dataset.VariableHasType<double>).ToList();
+
+        rawVariableImpacts.Clear();
+        originalVariableOrdering.ForEach(v => rawVariableImpacts.Add(v, impacts.First(vv => vv.Item1 == v).Item2));
+      }).ContinueWith((o) => {
+        UpdateDataOrdering();
+        mainForm.RemoveOperationProgressFromView(this);
+        thread = null;
+      }, TaskScheduler.FromCurrentSynchronizationContext());
     }
 
@@ -230,5 +216,5 @@
       };
 
-      //Could be, if the View was closed during the BackgroundWorker-run
+      //Could be, if the View was closed
       if (!variableImactsArrayView.IsDisposed) {
         variableImactsArrayView.Content = (DoubleArray)impactArray.AsReadOnly();
