mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 00:36:16 +02:00
fixed deadlock in binary tests
This commit is contained in:
parent
771e8d51cf
commit
b0cedbe5cc
1 changed files with 7 additions and 6 deletions
|
@ -337,25 +337,26 @@ public class CDescriptorManager implements ICDescriptorManager, IResourceChangeL
|
||||||
|
|
||||||
public void runDescriptorOperation(IProject project, ICDescriptorOperation op, IProgressMonitor monitor) throws CoreException {
|
public void runDescriptorOperation(IProject project, ICDescriptorOperation op, IProgressMonitor monitor) throws CoreException {
|
||||||
ICDescriptor descriptor = getDescriptor(project);
|
ICDescriptor descriptor = getDescriptor(project);
|
||||||
|
CDescriptorEvent event = null;
|
||||||
synchronized (descriptor) {
|
synchronized (descriptor) {
|
||||||
beginOperation(descriptor);
|
beginOperation(descriptor);
|
||||||
try {
|
try {
|
||||||
op.execute(descriptor, monitor);
|
op.execute(descriptor, monitor);
|
||||||
} finally {
|
} finally {
|
||||||
endOperation(descriptor);
|
event = endOperation(descriptor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (event != null) {
|
||||||
|
fireEvent(event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void beginOperation(ICDescriptor descriptor) {
|
private void beginOperation(ICDescriptor descriptor) {
|
||||||
fOperationMap.put(descriptor, null);
|
fOperationMap.put(descriptor, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void endOperation(ICDescriptor descriptor) {
|
private CDescriptorEvent endOperation(ICDescriptor descriptor) {
|
||||||
CDescriptorEvent event = (CDescriptorEvent) fOperationMap.remove(descriptor);
|
return (CDescriptorEvent) fOperationMap.remove(descriptor);
|
||||||
if (event != null) {
|
|
||||||
fireEvent(event);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue