Don't assert if we're not able to set affinity for some reason

pull/7590/head
Vijay Pai 9 years ago
parent 2507fef737
commit 6e5c33c3e2
  1. 4
      test/cpp/qps/limit_cores.cc

@ -68,9 +68,9 @@ int LimitCores(const int* cores, int cores_size) {
cores_set++; cores_set++;
} }
} }
GPR_ASSERT(sched_setaffinity(0, size, cpup) == 0); bool affinity_set = (sched_setaffinity(0, size, cpup) == 0);
CPU_FREE(cpup); CPU_FREE(cpup);
return cores_set; return affinity_set ? cores_set : num_cores;
} }
} // namespace testing } // namespace testing

Loading…
Cancel
Save