All challenges
Code AnalysisIntermediate 60s

MPMC queue index race root cause

// simplified MPMC queue void push(T v) { size_t i = head; // head is a plain size_t buf[i] = v; head = i + 1; } With multiple producer threads calling push, what is the root cause of corruption?

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