mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
More granular index locking.
This commit is contained in:
parent
ab5b237d74
commit
4cd1523cc1
1 changed files with 15 additions and 17 deletions
|
@ -202,27 +202,25 @@ abstract public class PDOMWriter {
|
||||||
}
|
}
|
||||||
index.acquireWriteLock(readlockCount);
|
index.acquireWriteLock(readlockCount);
|
||||||
long start= System.currentTimeMillis();
|
long start= System.currentTimeMillis();
|
||||||
|
Throwable th= null;
|
||||||
try {
|
try {
|
||||||
Throwable th= null;
|
storeFileInIndex(index, ifl, symbolMap, linkageID, configHash, contextIncludes);
|
||||||
try {
|
} catch (RuntimeException e) {
|
||||||
storeFileInIndex(index, ifl, symbolMap, linkageID, configHash, contextIncludes);
|
th= e;
|
||||||
} catch (RuntimeException e) {
|
} catch (PDOMNotImplementedError e) {
|
||||||
th= e;
|
th= e;
|
||||||
} catch (PDOMNotImplementedError e) {
|
} catch (StackOverflowError e) {
|
||||||
th= e;
|
th= e;
|
||||||
} catch (StackOverflowError e) {
|
|
||||||
th= e;
|
|
||||||
}
|
|
||||||
if (th != null) {
|
|
||||||
stati.add(createStatus(NLS.bind(Messages.PDOMWriter_errorWhileParsing,
|
|
||||||
ifl.getURI().getPath()), th));
|
|
||||||
}
|
|
||||||
if (i < ifls.length - 1) {
|
|
||||||
updateFileCount(0, 0, 1); // update header count
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
index.releaseWriteLock(readlockCount, flushIndex);
|
index.releaseWriteLock(readlockCount, flushIndex);
|
||||||
}
|
}
|
||||||
|
if (th != null) {
|
||||||
|
stati.add(createStatus(NLS.bind(Messages.PDOMWriter_errorWhileParsing,
|
||||||
|
ifl.getURI().getPath()), th));
|
||||||
|
}
|
||||||
|
if (i < ifls.length - 1) {
|
||||||
|
updateFileCount(0, 0, 1); // update header count
|
||||||
|
}
|
||||||
fStatistics.fAddToIndexTime+= System.currentTimeMillis() - start;
|
fStatistics.fAddToIndexTime+= System.currentTimeMillis() - start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue