Move num_threads to keyword param