Adding threadsafe queue