From dd2f61f090793c1f41e091b9bc86e3bcb88bc525 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 17 Jun 2011 16:13:20 +0200 Subject: Count properly --- src/partialator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/partialator.c b/src/partialator.c index aa4a5c8c..31c17f63 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -143,8 +143,11 @@ static void refine_all(struct image *images, int n_total_patterns, qargs.n_total_patterns = n_total_patterns; qargs.images = images; + /* Don't have threads which are doing nothing */ + if ( n_total_patterns > nthreads ) nthreads = n_total_patterns; + run_threads(nthreads, refine_image, get_image, done_image, - &qargs, n_total_patterns-1, 0, 0, 0); + &qargs, n_total_patterns, 0, 0, 0); } -- cgit v1.2.3