adding mutex for priority queue+map access