producer-consumer with 1 value buffer