add threads to distance calculation (but complete by polling all threads)