Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-11-27 14:01:35 -0500
committerMichael Valenta2003-11-27 14:01:35 -0500
commitb90a0d219f8ebced02a245dc922c351fba34f77e (patch)
treefa602b8d0e8c64a8de7cfd21b24f2366719ded15
parentc88440fb718a80c361a61b0a308ee5df9a5dc35a (diff)
downloadeclipse.platform.team-b90a0d219f8ebced02a245dc922c351fba34f77e.tar.gz
eclipse.platform.team-b90a0d219f8ebced02a245dc922c351fba34f77e.tar.xz
eclipse.platform.team-b90a0d219f8ebced02a245dc922c351fba34f77e.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
index 408546d4a..b758d310a 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
@@ -536,13 +536,21 @@ public class EclipseSynchronizer implements IFlushOperation {
* Begin an access to the internal data structures of the synchronizer
*/
private void beginOperation() {
+ // Do not try to acquire the lock if the resources tree is locked
+ // The reason for this is that during the resource delta phase (i.e. when the tree is locked)
+ // the workspace lock is held. If we obtain our lock, there is
+ // a chance of dealock. It is OK if we don't as we are still protected
+ // by scheduling rules and the workspace lock.
+ if (ResourcesPlugin.getWorkspace().isTreeLocked()) return;
lock.acquire();
}
/*
* End an access to the internal data structures of the synchronizer
*/
- private void endOperation() {
+ private void endOperation() {
+ // See beginOperation() for a description of why the lock is not obtained when the tree is locked
+ if (ResourcesPlugin.getWorkspace().isTreeLocked()) return;
lock.release();
}

Back to the top