mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 21:35:40 +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()) {
|
if (!lock.isContainerInitialize()) {
|
||||||
runInitializer = true;
|
runInitializer = true;
|
||||||
lock.setContainerInitialize(runInitializer);
|
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.
|
// Wait for the inialization to finish.
|
||||||
while (containerGet(project, containerPath, true) instanceof PathEntryContainerLock) {
|
while (containerGet(project, containerPath, true) instanceof PathEntryContainerLock) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue