Verification #44 · 2026-11-06 · Bounded mailboxes · Medium · about 15 min

The producer that drops items when the mailbox is full

feeder hands a run of items to a consumer through a bounded mailbox, created with new(depth) so it holds at most depth items waiting to be taken. The consumer takes items one at a time, and more slowly than send() offers them.

send(items) must deliver every item, in order, however small the mailbox is. Right now, when items is longer than depth and the consumer is behind, items go missing: the consumer receives only the first few. Fix send() in feeder.sv so nothing is lost.

Write and run your answer in the browser. The hidden tests check it, and it’s free.