Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez Gual <lluis@xamarin.com>2015-04-27 17:52:40 +0300
committerLluis Sanchez Gual <lluis@xamarin.com>2015-04-27 17:52:40 +0300
commit753257a3bfa01d52139b934c91e748108e4e8b77 (patch)
tree13093f956e029d131e60e57ab469757fa962120c /main/src/addins
parentd7398891d21b5780d73413b2c2dbfb3c7a4ef7d2 (diff)
Fix some continuations
Fixed some ContinueWith calls that needed to run on the UI thread
Diffstat (limited to 'main/src/addins')
-rw-r--r--main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/SoftDebuggerEngine.cs3
-rw-r--r--main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Extensions.cs5
-rw-r--r--main/src/addins/NUnit/Gui/TestPad.cs3
-rw-r--r--main/src/addins/NUnit/Services/NUnitService.cs2
4 files changed, 8 insertions, 5 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/SoftDebuggerEngine.cs b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/SoftDebuggerEngine.cs
index 4e4228a49d..f9755a2573 100644
--- a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/SoftDebuggerEngine.cs
+++ b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/SoftDebuggerEngine.cs
@@ -35,6 +35,7 @@ using Mono.Debugging.Client;
using MonoDevelop.Core;
using MonoDevelop.Core.Execution;
using MonoDevelop.Core.Assemblies;
+using System.Threading.Tasks;
namespace MonoDevelop.Debugger.Soft
{
@@ -167,7 +168,7 @@ namespace MonoDevelop.Debugger.Soft
oper.Task.ContinueWith (t => {
if (Exited != null)
Exited (this, EventArgs.Empty);
- });
+ }, TaskScheduler.FromCurrentSynchronizationContext ());
}
#region IProcess implementation
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Extensions.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Extensions.cs
index 6b7db7d7a2..0ea39ad8b3 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Extensions.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Extensions.cs
@@ -32,6 +32,7 @@ using MonoDevelop.Ide;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Projects;
using System.Collections.Generic;
+using System.Threading.Tasks;
namespace MonoDevelop.Debugger
{
@@ -83,7 +84,7 @@ namespace MonoDevelop.Debugger
oper.Task.ContinueWith (t => {
monitor.Dispose ();
IdeApp.Workbench.CurrentLayout = oldLayout;
- });
+ }, TaskScheduler.FromCurrentSynchronizationContext ());
return oper;
}
@@ -107,7 +108,7 @@ namespace MonoDevelop.Debugger
oper.Task.ContinueWith (t => {
IdeApp.Workbench.CurrentLayout = oldLayout;
- });
+ }, TaskScheduler.FromCurrentSynchronizationContext ());
}
}
}
diff --git a/main/src/addins/NUnit/Gui/TestPad.cs b/main/src/addins/NUnit/Gui/TestPad.cs
index 5685fbc89d..5f80de59ba 100644
--- a/main/src/addins/NUnit/Gui/TestPad.cs
+++ b/main/src/addins/NUnit/Gui/TestPad.cs
@@ -45,6 +45,7 @@ using System.Linq;
using MonoDevelop.Components;
using MonoDevelop.Ide.Commands;
using System.Collections.Generic;
+using System.Threading.Tasks;
namespace MonoDevelop.NUnit
{
@@ -488,7 +489,7 @@ namespace MonoDevelop.NUnit
if (bringToFront)
IdeApp.Workbench.GetPad<TestPad> ().BringToFront ();
runningTestOperation = testService.RunTest (test, mode);
- runningTestOperation.Task.ContinueWith (t => OnTestSessionCompleted ());
+ runningTestOperation.Task.ContinueWith (t => OnTestSessionCompleted (), TaskScheduler.FromCurrentSynchronizationContext ());
return runningTestOperation;
}
diff --git a/main/src/addins/NUnit/Services/NUnitService.cs b/main/src/addins/NUnit/Services/NUnitService.cs
index 2ecd85412b..1645b9d8b8 100644
--- a/main/src/addins/NUnit/Services/NUnitService.cs
+++ b/main/src/addins/NUnit/Services/NUnitService.cs
@@ -93,7 +93,7 @@ namespace MonoDevelop.NUnit
public AsyncOperation RunTest (UnitTest test, IExecutionHandler context)
{
var result = RunTest (test, context, IdeApp.Preferences.BuildBeforeRunningTests);
- result.Task.ContinueWith (t => OnTestSessionCompleted ());
+ result.Task.ContinueWith (t => OnTestSessionCompleted (), TaskScheduler.FromCurrentSynchronizationContext ());
return result;
}