Skip to content

Commit

Permalink
Use len(os.sched_getaffinity(0)) instead of os.cpu_count()
Browse files Browse the repository at this point in the history
  • Loading branch information
avkarenow authored Jan 18, 2024
1 parent 6c770dc commit 0bfc0ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def build_libuv(self):
cmd,
cwd=LIBUV_BUILD_DIR, env=env, check=True)

j_flag = '-j{}'.format(os.cpu_count() or 1)
j_flag = '-j{}'.format(len(os.sched_getaffinity(0)) or 1)
c_flag = "CFLAGS={}".format(env['CFLAGS'])
subprocess.run(
['make', j_flag, c_flag],
Expand Down

0 comments on commit 0bfc0ef

Please sign in to comment.