Skip to content
  • Grisha Kruglov's avatar
    Pre 2: remove unnecessary synchronization from FxaDeviceConstellation · 7611dfd7
    Grisha Kruglov authored
    I'm not sure it was ever necessary, to be honest. I think the way the 'refresh'
    method is currently structured, simply marking internal 'constellationState'
    as Volatile is enough - we're not concerned about concurrent access to it,
    only about memory visibility across threads.
    
    It's true that currently, work in this class happens on a pool thread,
    so it's possible to have two racing 'refresh' methods running. Having one of them
    loose the race and drop results on the floor should be just fine in this case.
    7611dfd7