Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Race condition in CProjectDescriptionManager.updateProjectDescriptions()?

Christian Walther wrote:
> 
> Andrew Gvozdev wrote:
>> 
>> Those are dark parts of CDT where knowledge is lost... Maybe updateProjectDescriptions() should check if the project description is still up to date before setting? If not just forget about it, this old description is gone already.
> 
> That's a good idea, I'll give it a try.

On second thought, how would I best do that? The project description that is gotten in the first part and then set back in the second is a writable one, so I can't just get another one and see if I get the same object - being writable copies, they are always different objects. I could save a non-writable one as well and use that for the comparison (which appears to work), but is there an easier way? And if I do it that way, do I even need the writable description or can I just as well use the non-writable one for setting? It looks like that might work because SetCProjectDescriptionOperation.executeOperation() makes another copy anyway, but we're getting a bit deep into the "dark parts" here... it's hard to tell if I'm breaking anything when I don't even know what the function is supposed to achieve in the first place.

 -Christian



Back to the top