1
0
Fork 0
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:
Sergey Prigogin 2009-10-25 20:38:57 +00:00
parent ab5b237d74
commit 4cd1523cc1

View file

@ -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;
}
}