fixed a potential deadlock in the distributed-multi-threaded cartography algorithm