google / benchmark

A microbenchmark support library
Apache License 2.0
8.93k stars 1.62k forks source link

sysinfo.cc: Always abort on GetNumCPUs failure #1756

Closed thesamesam closed 7 months ago

thesamesam commented 7 months ago

Defines a wrapper function, CheckNumCPUs, which enforces that GetNumCPUs never returns fewer than one CPU. There is no reasonable way to continue if we are unable to identify the number of CPUs.

This is a followup to https://github.com/google/benchmark/pull/1753.

LebedevRI commented 7 months ago

@thesamesam thank you!

thesamesam commented 7 months ago

Many thanks!