X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fcompress_parallel.c;h=6aa635bf669803e1ec2500336a0ab163d0d44977;hp=511ef1b84ee73451048c21020cf9af7845f4a8b9;hb=01ce2d43d6ba9721bf46c3e132c4be394ef3f0f9;hpb=f0b5b16920d4478d053e48db08014e5d57f11263 diff --git a/src/compress_parallel.c b/src/compress_parallel.c index 511ef1b8..6aa635bf 100644 --- a/src/compress_parallel.c +++ b/src/compress_parallel.c @@ -247,7 +247,6 @@ parallel_chunk_compressor_destroy(struct chunk_compressor *_ctx) return; if (ctx->num_started_threads != 0) { - DEBUG("Terminating %u compressor threads", ctx->num_started_threads); message_queue_terminate(&ctx->chunks_to_compress_queue); for (i = 0; i < ctx->num_started_threads; i++) @@ -377,11 +376,8 @@ new_parallel_chunk_compressor(int out_ctype, u32 out_chunk_size, if (num_threads == 0) num_threads = get_available_cpus(); - if (num_threads == 1) { - DEBUG("Only 1 thread; Not bothering with " - "parallel chunk compressor."); + if (num_threads == 1) return -1; - } if (max_memory == 0) max_memory = get_available_memory(); @@ -433,11 +429,8 @@ new_parallel_chunk_compressor(int out_ctype, u32 out_chunk_size, desired_num_threads, num_threads); } - if (num_threads == 1) { - DEBUG("Only 1 thread; Not bothering with " - "parallel chunk compressor."); + if (num_threads == 1) return -2; - } ret = WIMLIB_ERR_NOMEM; ctx = CALLOC(1, sizeof(*ctx)); @@ -484,8 +477,6 @@ new_parallel_chunk_compressor(int out_ctype, u32 out_chunk_size, ctx->num_started_threads < num_threads; ctx->num_started_threads++) { - DEBUG("pthread_create thread %u of %u", - ctx->num_started_threads + 1, num_threads); ret = pthread_create(&ctx->thread_data[ctx->num_started_threads].thread, NULL, compressor_thread_proc,