Truncate the number of threads if uneven number