Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-04-25 13:46:10 -0400
committerPaul Pazderski2019-04-25 14:45:02 -0400
commit33e75e385ad0cf1f967ae7cf69c8b5cfd4adc257 (patch)
tree9c9b2c44190def2845626bc0392dd45b39f1534a /org.eclipse.debug.ui/ui/org/eclipse/debug/internal
parentf0cc33023dda08a2bae26b32c8e22a2863729724 (diff)
downloadeclipse.platform.debug-33e75e385ad0cf1f967ae7cf69c8b5cfd4adc257.tar.gz
eclipse.platform.debug-33e75e385ad0cf1f967ae7cf69c8b5cfd4adc257.tar.xz
eclipse.platform.debug-33e75e385ad0cf1f967ae7cf69c8b5cfd4adc257.zip
Bug 546710 - [console] Synchronize "remove all" action enable updateI20190427-1800I20190426-1800I20190425-1800
This should fix the following race condition for fast terminating processes: When the action is constructed it will update its enablement. The terminated notification, which also updates enablement, can come from a different thread. It may happen that the initial enablement update is interrupted after calculating the enablement state but before setting it. If then the process terminates the action is enabled due to terminated notification but the later resumed initial update will set it to disabled again. Change-Id: I32eafe4676b3fbd57a997ef75c96965bb5159f2f Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleRemoveAllTerminatedAction.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleRemoveAllTerminatedAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleRemoveAllTerminatedAction.java
index 9a6a16a25..53fb177ef 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleRemoveAllTerminatedAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleRemoveAllTerminatedAction.java
@@ -35,7 +35,7 @@ public class ConsoleRemoveAllTerminatedAction extends Action implements IUpdate,
}
@Override
- public void update() {
+ public synchronized void update() {
ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
for (int i = 0; i < launches.length; i++) {
ILaunch launch = launches[i];

Back to the top