DescriptionFix the race to set the new gen ID.
There's a small window where two threads can both see the gen ID is zero,
both go get new distinct genIDs, but race to write them.
This now uses compare_exchange to read and leave the winner's ID in place
when there's a race.
SkAtomics isn't public.
TBR=reed@google.com
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/59c9203321cf4afb48597f39e4bdd4ae91da12a0
Patch Set 1 #Patch Set 2 : rebase #Patch Set 3 : comma #Patch Set 4 : fix #Messages
Total messages: 14 (6 generated)
|