Add max number of thread