multi-thread gmm