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
Lint
Lint Not Applicable
Unit
Tests Not Applicable