aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-10-08 18:52:40 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:02 +0100
commite06afa53f7b7ad64c2c51ecb0eeafcd4099a1292 (patch)
tree32398ec6f1e08a4766839dbbd966cfd97b419bc4 /src
parenta026279385d4b67682b13b100083ef708eaf6280 (diff)
facetron: Handle nthreads > n_total_patterns
Diffstat (limited to 'src')
-rw-r--r--src/facetron.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/facetron.c b/src/facetron.c
index bd7f58ed..6c04835a 100644
--- a/src/facetron.c
+++ b/src/facetron.c
@@ -240,6 +240,8 @@ static void munch_threads(struct image *images, int n_total_patterns,
struct process_args *pargs;
int r;
+ if ( n_started == n_total_patterns ) break;
+
pargs = worker_args[i];
pargs->image = &images[n_started++];