Skip to main content

Checkpoint: The Bounded Buffer

advanced25 min readLesson 136 of 180

Build a lock+Condition bounded buffer, run it under choreographed load, and state the CAS tradeoff.

Checkpoint: the bounded buffer, three ways

The bounded buffer is the "hello world" of concurrency — and the best diagnostic of whether someone understands synchronization. Build it with a lock + two Conditions, prove it under choreographed load, and state the CAS alternative.