num_threads support