Multiple ChoiceIntermediate 45s
latch vs barrier reusability
What is the key distinction between std::latch and std::barrier?
Options
- 1A latch is reusable across multiple phases while a barrier is single-use and cannot be reset
- 2A barrier is reusable across phases with a completion callback; a latch is single-use
- 3They are identical aliases with interchangeable names and exactly the same semantics
- 4A latch only works with exactly two threads while a barrier scales to arbitrary counts
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.