Compiling version of producer and consumer. Something seems to be wrong with the os and how it gets next threads