Take a look at the bounded_buffer example in the circular_buffer documentation.

Rodrigo

P.S. Steve, why the AMDG in all of your emails?