Muti-threaded word counter with multiple producer, multiple consumer thread-safe queue and map