Re: [PATCH v2 08/10] read-cache.c: remove #ifdef NO_PTHREADS

2018-10-29 Thread Ben Peart
On 10/29/2018 10:30 AM, Jeff King wrote: On Sat, Oct 27, 2018 at 07:30:06PM +0200, Nguyễn Thái Ngọc Duy wrote: -#ifndef NO_PTHREADS - nr_threads = git_config_get_index_threads(); + if (HAVE_THREADS) { + nr_threads = git_config_get_index_threads(); - /* TODO:

Re: [PATCH v2 08/10] read-cache.c: remove #ifdef NO_PTHREADS

2018-10-29 Thread Ben Peart
On 10/29/2018 10:30 AM, Jeff King wrote: On Sat, Oct 27, 2018 at 07:30:06PM +0200, Nguyễn Thái Ngọc Duy wrote: -#ifndef NO_PTHREADS - nr_threads = git_config_get_index_threads(); + if (HAVE_THREADS) { + nr_threads = git_config_get_index_threads(); - /* TODO:

Re: [PATCH v2 08/10] read-cache.c: remove #ifdef NO_PTHREADS

2018-10-29 Thread Jeff King
On Sat, Oct 27, 2018 at 07:30:06PM +0200, Nguyễn Thái Ngọc Duy wrote: > -#ifndef NO_PTHREADS > - nr_threads = git_config_get_index_threads(); > + if (HAVE_THREADS) { > + nr_threads = git_config_get_index_threads(); > > - /* TODO: does creating more threads than cores

[PATCH v2 08/10] read-cache.c: remove #ifdef NO_PTHREADS

2018-10-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- read-cache.c | 49 ++--- 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/read-cache.c b/read-cache.c index d57958233e..ba870bc3fd 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1920,19 +1920,15