All challenges
Multiple ChoiceHard 45s

How jthread differs from std::thread

What does std::jthread add over std::thread in C++20?
Options
  1. 1Automatic joining on destruction and a stop_token-based cooperative cancellation
  2. 2A shared mutex that synchronizes the very start of every spawned thread before it runs
  3. 3Automatic propagation of exceptions thrown in the thread function back to the joining caller
  4. 4A built-in thread pool that reuses threads across successive jthread objects automatically

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