1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-30 12:25:35 +02:00

Fix a possible deadlock

This commit is contained in:
Alain Magloire 2005-03-01 22:00:59 +00:00
parent 97e4969629
commit 361aa3e14e

View file

@ -822,7 +822,11 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
if (!lock.isContainerInitialize()) {
runInitializer = true;
lock.setContainerInitialize(runInitializer);
} else {
} else if (! Thread.holdsLock(lock)){
// FIXME: Use Thread.holdsLock(lock) to break the cycle.
// This seem to happend when the container(say the auto discovery)
// trigger a resource change, the CoreModel will try to get the pathentries .. deadlock.
// Wait for the inialization to finish.
while (containerGet(project, containerPath, true) instanceof PathEntryContainerLock) {
try {