@return : 0 on success, 1 on error */
| 231 | |
| 232 | /* @return : 0 on success, 1 on error */ |
| 233 | int POOL_resize(POOL_ctx* ctx, size_t numThreads) |
| 234 | { |
| 235 | int result; |
| 236 | if (ctx==NULL) return 1; |
| 237 | ZSTD_pthread_mutex_lock(&ctx->queueMutex); |
| 238 | result = POOL_resize_internal(ctx, numThreads); |
| 239 | ZSTD_pthread_cond_broadcast(&ctx->queuePopCond); |
| 240 | ZSTD_pthread_mutex_unlock(&ctx->queueMutex); |
| 241 | return result; |
| 242 | } |
| 243 | |
| 244 | /** |
| 245 | * Returns 1 if the queue is full and 0 otherwise. |
no test coverage detected