mirror of
https://github.com/docker/cli.git
synced 2026-10-07 06:26:40 -04:00
This fix tries to address issues raised in #23768 where the CPU count is not updated after cpu ho-plugging. This fix follows the suggestion from #23768 and replace go's `runtime.NumCPU()` with `sysconf(_SC_NPROCESSORS_ONLN)` so that correct CPU count could be obtained even after CPU hot-plugging. This fix is tested manually, as is suggested in #23768. This fix fixes #23768. The NumCPU() in Linux is based on @wmark 's implementation. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: 8b2383f5c1108c590928c0e6c57f1f0aa0dd36f6 Component: engine