1
0
Fork 0
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:
David Inglis 2004-05-04 20:27:04 +00:00
parent 771e8d51cf
commit b0cedbe5cc

View file

@ -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);
}
/*