Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint: The Pipeline

โญโญ intermediateโณ 30 min read๐Ÿ“ Lesson 144 of 225

Prove the concurrency discipline: exact results through a bounded queue with real threads.

The task

Implement producer_body and consumer_body (see the challenge). The queue and harness are given (correct); the graded work is the choreography: producers signal completion, the consumer relies on the queue's blocking pop โ€” and the total comes out exact: 4950 through a 4-slot pipe, then 1225, then 0 for an empty pipeline. No timing assumptions survive this test; only correct synchronization does.

Passing this proves you can wire real threads around a shared bounded resource โ€” the pattern behind every worker pool and channel in production C.

Next module: the capstone โ€” every module's discipline in one program.