Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Kubitz2022-02-11 12:55:16 +0000
committerJörg Kubitz2022-03-08 11:20:59 +0000
commit6abd3444b8571f7f973f946cdbdd552dab5ba4cf (patch)
treed4c8082087cb6290b9ba5b2a227a435be68c09ab
parentc9a4d0da0cb492dc230c54b76d1814c7a357629f (diff)
downloadeclipse.platform.resources-6abd3444b8571f7f973f946cdbdd552dab5ba4cf.tar.gz
eclipse.platform.resources-6abd3444b8571f7f973f946cdbdd552dab5ba4cf.tar.xz
eclipse.platform.resources-6abd3444b8571f7f973f946cdbdd552dab5ba4cf.zip
Bug 578578 - prevent AutoBuildJob to lock workspace while interruptedI20220308-1800
Interrupted flag was checked to late - only in in the building loop when the workspace operation was already started. Instead the check should also done before to avoid a race condition to get the lock Change-Id: If0c8d3289c53a0f13b9ea71b5bc8627fd2d1ad27 Signed-off-by: Joerg Kubitz <jkubitz-eclipse@gmx.de> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/190715 Tested-by: Platform Bot <platform-bot@eclipse.org>
-rw-r--r--bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/AutoBuildJob.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/AutoBuildJob.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/AutoBuildJob.java
index dfe0a9a46..d3f6b895f 100644
--- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/AutoBuildJob.java
+++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/AutoBuildJob.java
@@ -244,7 +244,7 @@ class AutoBuildJob extends Job implements Preferences.IPropertyChangeListener {
public IStatus run(IProgressMonitor monitor) {
SubMonitor subMonitor = SubMonitor.convert(monitor, 1);
synchronized (this) {
- if (subMonitor.isCanceled()) {
+ if (subMonitor.isCanceled() || isInterrupted()) {
return canceled();
}
}

Back to the top