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:
parent
97e4969629
commit
361aa3e14e
1 changed files with 5 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue