Skip to content

Commit

Permalink
Merge pull request grpc#7590 from vjpai/affinity_optional
Browse files Browse the repository at this point in the history
Don't assert if we're not able to set CPU affinity
  • Loading branch information
vjpai authored Aug 2, 2016
2 parents fcccb5a + 6e5c33c commit 18983f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/cpp/qps/limit_cores.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ int LimitCores(const int* cores, int cores_size) {
cores_set++;
}
}
GPR_ASSERT(sched_setaffinity(0, size, cpup) == 0);
bool affinity_set = (sched_setaffinity(0, size, cpup) == 0);
CPU_FREE(cpup);
return cores_set;
return affinity_set ? cores_set : num_cores;
}

} // namespace testing
Expand Down

0 comments on commit 18983f8

Please sign in to comment.