Producer/Consumer with QSemaphore with infinite loops