From 926c5603aa92798ac7cf95c49031f84776292357 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 15 Dec 2014 14:00:23 +0000 Subject: [PATCH] Improve documentation on concurrency/parallelism --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c0c998a9..ee0c6737 100755 --- a/README.md +++ b/README.md @@ -464,7 +464,7 @@ sharp.cache(50, 200); // { current: 49, high: 99, memory: 50, items: 200} #### sharp.concurrency([threads]) -`threads`, if provided, is the Number of threads _libvips'_ should create for image processing. The default value is the number of CPU cores. A value of `0` will reset to this default. +`threads`, if provided, is the Number of threads _libvips'_ should create for processing each image. The default value is the number of CPU cores. A value of `0` will reset to this default. This method always returns the current concurrency. @@ -474,6 +474,8 @@ sharp.concurrency(2); // 2 sharp.concurrency(0); // 4 ``` +The maximum number of images that can be processed in parallel is limited by libuv's `UV_THREADPOOL_SIZE` environment variable. + #### sharp.counters() Provides access to internal task counters.