diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-09-28 14:36:28 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-09-28 14:42:21 -0400 |
commit | 73d93c033d3f4b9c95e8f3a5cc7e4a255d523b84 (patch) | |
tree | 4a6ef543d04d0153134d973977b0e5bfce80425d /src/or/cpuworker.c | |
parent | c612ddee17c2f6e70fde9f0bdd7116516f384ae8 (diff) | |
download | tor-73d93c033d3f4b9c95e8f3a5cc7e4a255d523b84.tar.gz tor-73d93c033d3f4b9c95e8f3a5cc7e4a255d523b84.zip |
Autodetect the number of CPUs when possible if NumCPUs==0
This is needed for IOCP, since telling the IOCP backend about all
your CPUs is a good idea. It'll also come in handy with asn's
multithreaded crypto stuff, and for people who run servers without
reading the manual.
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r-- | src/or/cpuworker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index e5b2c71025..cfe9f3af9c 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -366,7 +366,7 @@ spawn_cpuworker(void) static void spawn_enough_cpuworkers(void) { - int num_cpuworkers_needed = get_options()->NumCpus; + int num_cpuworkers_needed = get_num_cpus(get_options()); if (num_cpuworkers_needed < MIN_CPUWORKERS) num_cpuworkers_needed = MIN_CPUWORKERS; |