Lines Matching full:threads
36 /* Keep track of the threads */
37 ZSTD_pthread_t* threads; member
47 /* The number of threads working on jobs */
78 * a few threads will be shutdown while !queueEmpty, in POOL_thread()
79 * but enough threads will remain active to finish the queue */ in POOL_thread()
139 ctx->threads = (ZSTD_pthread_t*)ZSTD_malloc(numThreads * sizeof(ZSTD_pthread_t), customMem); in POOL_create_advanced()
143 if (!ctx->threads || !ctx->queue) { POOL_free(ctx); return NULL; } in POOL_create_advanced()
144 /* Initialize the threads */ in POOL_create_advanced()
147 if (ZSTD_pthread_create(&ctx->threads[i], NULL, &POOL_thread, ctx)) { in POOL_create_advanced()
159 Shutdown the queue, wake any sleeping threads, and join all of the threads.
166 /* Wake up sleeping threads */ in POOL_join()
169 /* Join all of the threads */ in POOL_join()
172 ZSTD_pthread_join(ctx->threads[i], NULL); /* note : could fail */ in POOL_join()
183 ZSTD_free(ctx->threads, ctx->customMem); in POOL_free()
209 memcpy(threadPool, ctx->threads, ctx->threadCapacity * sizeof(*threadPool)); in POOL_resize_internal()
210 ZSTD_free(ctx->threads, ctx->customMem); in POOL_resize_internal()
211 ctx->threads = threadPool; in POOL_resize_internal()
212 /* Initialize additional threads */ in POOL_resize_internal()