Skip to content

Commit 7341bf0

Browse files
committed
[work] fix docs for Work_NormalizeThreadCount
1 parent 58058a8 commit 7341bf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pxr/base/work/threadLimits.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ WorkGetPhysicalConcurrencyLimit()
7171
#endif
7272
}
7373

74-
// This function always returns an actual thread count >= 1.
74+
// This function always returns either 0 (meaning "no change") or >= 1
7575
static unsigned
7676
Work_NormalizeThreadCount(const int n)
7777
{
7878
// Zero means "no change", and n >= 1 means exactly n threads, so simply
7979
// pass those values through unchanged.
8080
// For negative integers, subtract the absolute value from the total number
81-
// of available cores (denoting all but n cores). If n == number of cores,
81+
// of available cores (denoting all but n cores). If |n| >= number of cores,
8282
// clamp to 1 to set single-threaded mode.
8383
return n >= 0 ? n : std::max<int>(1, n + WorkGetPhysicalConcurrencyLimit());
8484
}

0 commit comments

Comments
 (0)