Multithreading try for kd-tree