All challenges
Multiple ChoiceBeginner 45s

Counting Semaphore acquire/try_acquire

For std::counting_semaphore, what does try_acquire() return when the counter is zero?
Options
  1. 1false immediately without blocking
  2. 2It blocks until available
  3. 3true and decrements below zero
  4. 4Throws std::system_error

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