All challenges
Multiple ChoiceBeginner 45s

seqlock reader retry condition

In a seqlock, how does a reader detect that it may have read torn data?
Options
  1. 1It reads the sequence counter before and after, requiring both even and equal
  2. 2It takes a mutex alongside the writer before reading the shared payload
  3. 3It checks a boolean dirty flag the writer sets before and clears after writing
  4. 4It uses std::atomic<double> for the payload so torn reads cannot occur

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle