Closed ls-urs-keller closed 5 years ago
Since there is already a check on isConfigurable in that method, then no, on the face of it I don't see why there needs to be yet another check.
Since there is already a check on isConfigurable in that method, then no, on the face of it I don't see why there needs to be yet another check.
Assume two threads T1 and T2. T1 runs freezeConfiguration and gets suspended just before the synchronized block (line 832) T2 runs freezeConfiguration and enters the synchronized block T1 resumes and gets blocked on the synchronized block T2 exits the synchronized block T1 resumes and since the check is missing runs the initialization a second time.
I actually have this in real world code.
Suggest that you actually go back to your "issue" and add all of that to the "problem description". Without it, people won't know WHY you think something is needed. Once you have defined the problem then a PR makes more sense.
FWIW it is possible to sync the creation of a PMF hence why nobody else has seen that problem.
see #99