Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-05-25 06:47:24 -0400
committerUwe Stieber2013-05-25 06:47:24 -0400
commit4b52289b8e1b10216f049446d0a0d7bb4de1d607 (patch)
treed84b8ab2d1dc5a08f700af5d4b9ecd2ebceadf48 /target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf
parent7ce79da39e2f3284f074b6d128247f8b854a6988 (diff)
downloadorg.eclipse.tcf-4b52289b8e1b10216f049446d0a0d7bb4de1d607.tar.gz
org.eclipse.tcf-4b52289b8e1b10216f049446d0a0d7bb4de1d607.tar.xz
org.eclipse.tcf-4b52289b8e1b10216f049446d0a0d7bb4de1d607.zip
Target Explorer: Fix illegal thread access on shutdown
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
index 1b316f3b4..64ded3e49 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
@@ -102,7 +102,17 @@ public class UIPlugin extends AbstractUIPlugin {
if (proceedShutdown || forced) {
// Terminate the scanner
final ILocatorModel model = Model.getModel(true);
- if (model != null) model.getScanner().terminate();
+ if (model != null) {
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ model.getScanner().terminate();
+ }
+ };
+
+ Assert.isTrue(!Protocol.isDispatchThread());
+ Protocol.invokeAndWait(runnable);
+ }
// Disconnect all connected connections via the stepper service
if (model != null) {

Back to the top