Generic code for Multi Producer– Multi Consumer with generic data type using POSIX threads.