Temporarily removed the access and management of the distnace_map
data structure to see the effect on performance. Turns out the
distance_map takes a significant amount of time to manage, and
eliminating it make the main thread go from being the bottleneck
to making the reader and writer threads be the bottleneck.

This means that it will be more efficient to just send the
distances into the reader thread to be looped back to the main
thread again, eliminating the need for the distance_map.