Multithread the consumer
Fix output
Refactor sleep and locks