reduced POOL_resize() restriction
It's not necessary to ensure that no job is ongoing. The pool is only expanded, existing threads are preserved. In case of error, the only option is to return NULL and terminate the thread pool anyway.
This commit is contained in:
@@ -188,7 +188,6 @@ size_t POOL_sizeof(POOL_ctx *ctx) {
|
||||
/* note : only works if no job is running ! */
|
||||
static POOL_ctx* POOL_resize_internal(POOL_ctx* ctx, size_t numThreads)
|
||||
{
|
||||
if (ctx->numThreadsBusy > 0) return NULL;
|
||||
if (numThreads <= ctx->threadCapacity) {
|
||||
ctx->threadLimit = numThreads;
|
||||
return ctx;
|
||||
|
||||
Reference in New Issue
Block a user