change return type of set_num_threads() to void