Skip to content

Commit 110b0a7

Browse files
Avoid setting thread affinity of 0 in mac (#5962) (#5971)
(cherry picked from commit bc89cda) Signed-off-by: cferreiragonz <[email protected]> Co-authored-by: Carlos Ferreira González <[email protected]>
1 parent 2a36636 commit 110b0a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cpp/utils/threading/threading_osx.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static void configure_current_thread_affinity(
129129
const char* thread_name,
130130
uint64_t affinity)
131131
{
132-
if (affinity <= static_cast<uint64_t>(std::numeric_limits<integer_t>::max()))
132+
if (affinity != 0 && affinity <= static_cast<uint64_t>(std::numeric_limits<integer_t>::max()))
133133
{
134134
int result = 0;
135135
thread_affinity_policy_data_t policy = { static_cast<integer_t>(affinity) };

0 commit comments

Comments
 (0)