mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +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);
|
||||
long start= System.currentTimeMillis();
|
||||
Throwable th= null;
|
||||
try {
|
||||
Throwable th= null;
|
||||
try {
|
||||
storeFileInIndex(index, ifl, symbolMap, linkageID, configHash, contextIncludes);
|
||||
} catch (RuntimeException e) {
|
||||
th= e;
|
||||
} catch (PDOMNotImplementedError 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
|
||||
}
|
||||
storeFileInIndex(index, ifl, symbolMap, linkageID, configHash, contextIncludes);
|
||||
} catch (RuntimeException e) {
|
||||
th= e;
|
||||
} catch (PDOMNotImplementedError e) {
|
||||
th= e;
|
||||
} catch (StackOverflowError e) {
|
||||
th= e;
|
||||
} finally {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue