Commit 8c8484c
use folly::hardware_concurrency instead of std::thread::hardware_concurrency
Summary:
This change replaces calls of std::thread::hardware_concurrency with
folly::hardware_concurrency when the caller wants the number of
processors available to a job.
This should be largely a no-change since most jobs use platform010
with glibc 2.34 where these functions behave identically. However,
jobs on Aarch64 use glibc 2.40. There, the folly method continues to
return the number of processors available to a job but the std version
returns the number of processors known to the operating system, a
different number when the job is stacked.
Most of fbcode expects the folly behavior and this codemod only
affects those callers. By making the switch to the folly method, code
will behave the same when code is run on Aarch64 or when the glibc is
upgraded on x86.
Reviewed By: yfeldblum
Differential Revision: D87911300
fbshipit-source-id: 92f68edc736fe1f10940e115a750f72e09a4a60c1 parent 8375989 commit 8c8484c
File tree
2 files changed
+4
-2
lines changed- third-party/mcrouter/src/mcrouter
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
462 | | - | |
| 463 | + | |
463 | 464 | | |
464 | 465 | | |
465 | 466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
304 | | - | |
| 305 | + | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
| |||
0 commit comments