concurrent knn.py