multi_thread query