Some implementation of the Producer/Consumer