Page MenuHomePhabricator

Use os.cpu_count in test_runner instead of multiprocessing
ClosedPublic

Authored by roqqit on Mon, Dec 9, 19:43.

Details

Reviewers
PiRK
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABCe0198d8be5cd: Use os.cpu_count in test_runner instead of multiprocessing
Summary

This eliminates unnecessarily importing multiprocessing. multiprocessing.cpu_count() just calls os.cpu_count() anyway:
https://github.com/python/cpython/blob/main/Lib/multiprocessing/context.py#L43

The or 1 keeps the linter happy since os.cpu_count() can return None in some rare cases.

Test Plan
ninja check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Branch
test-runner-multiproc
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31591
Build 62679: Build Diffbuild-clang-tidy · build-diff · build-clang · build-without-wallet · build-debug
Build 62678: arc lint + arc unit