mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +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 {
|
||||
ICDescriptor descriptor = getDescriptor(project);
|
||||
CDescriptorEvent event = null;
|
||||
synchronized (descriptor) {
|
||||
beginOperation(descriptor);
|
||||
try {
|
||||
op.execute(descriptor, monitor);
|
||||
} finally {
|
||||
endOperation(descriptor);
|
||||
event = endOperation(descriptor);
|
||||
}
|
||||
}
|
||||
if (event != null) {
|
||||
fireEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
private void beginOperation(ICDescriptor descriptor) {
|
||||
fOperationMap.put(descriptor, null);
|
||||
}
|
||||
|
||||
private void endOperation(ICDescriptor descriptor) {
|
||||
CDescriptorEvent event = (CDescriptorEvent) fOperationMap.remove(descriptor);
|
||||
if (event != null) {
|
||||
fireEvent(event);
|
||||
}
|
||||
private CDescriptorEvent endOperation(ICDescriptor descriptor) {
|
||||
return (CDescriptorEvent) fOperationMap.remove(descriptor);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue