How to start and shut down gracefully. To ensure that producers and consumers complete their work during the period