Is conf.IncludePaths.Add thread safe? #310
-
Hey, I'm trying to debug a tricky behavior where I've noticed sometimes an include path is present and sometimes it is not. I can't easily share the repro case as this is a private (corporate) fork with some modifications - but it would really help my sanity to know from someone more familiar with C#, sharpmake and the OrderableStrings type if it is safe to Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, |
Beta Was this translation helpful? Give feedback.
Hi,
I think I misunderstood your initial question!
Each project is processed in a separate thread and each project is only allowed to modify its own fields. For example, to modify IncludePaths property of a specific configuration, this is done via Configure methods. If you follow the rules, the app is 100% safe.
so if you got ProjectA and ProjectB, you are not allowed to modify the include paths of ProjectB from ProjectA and vice-versa.
There is also some constraint on when those collections can be modified. Also, once the configure methods are all executed, many collections become readonly(there is some checks for that).