Changing priority of threads