mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-02 22:05:44 +02:00
Remove obsolete synchronized block
This commit is contained in:
parent
beb1492c3e
commit
c075878b2a
1 changed files with 4 additions and 7 deletions
|
@ -129,19 +129,16 @@ public class ASTCache {
|
||||||
// no cached AST, but wait
|
// no cached AST, but wait
|
||||||
if (isActiveElement && isReconciling(tUnit)) {
|
if (isActiveElement && isReconciling(tUnit)) {
|
||||||
try {
|
try {
|
||||||
final ICElement activeElement= fActiveTU;
|
|
||||||
// Wait for AST
|
// Wait for AST
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println(DEBUG_PREFIX + getThreadName() + "waiting for AST for: " + tUnit.getElementName()); //$NON-NLS-1$
|
System.out.println(DEBUG_PREFIX + getThreadName() + "waiting for AST for: " + tUnit.getElementName()); //$NON-NLS-1$
|
||||||
fCacheMutex.wait();
|
fCacheMutex.wait();
|
||||||
// Check whether active element is still valid (
|
// Check whether active element is still valid (
|
||||||
synchronized (this) {
|
if (fAST != null) {
|
||||||
if (activeElement == fActiveTU && fAST != null) {
|
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println(DEBUG_PREFIX + getThreadName() + "...got AST for: " + tUnit.getElementName()); //$NON-NLS-1$
|
System.out.println(DEBUG_PREFIX + getThreadName() + "...got AST for: " + tUnit.getElementName()); //$NON-NLS-1$
|
||||||
return fAST;
|
return fAST;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// try again
|
// try again
|
||||||
continue;
|
continue;
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue