multithreading in cloudsegmenter