Skip to content

relay: Use the configured number of threads for worker work calculation

David Goulet requested to merge dgoulet/tor:ticket40719_047_01 into maint-0.4.7

We cap our number of CPU worker threads to at least 2 even if we have a single core. But also, before we used to always add one extra thread regardless of the number of core.

This meant that we were off when re-using the get_num_cpus() function when calculating our onionskin work overhead because we were always off by one.

This commit makes it that we always use the number of thread our actual thread pool was configured with.

Fixes #40719 (closed)

Signed-off-by: David Goulet dgoulet@torproject.org

Edited by David Goulet

Merge request reports