multi-thread getTrainingData