mirror of
https://github.com/facebook/zstd.git
synced 2025-07-29 11:21:22 +03:00
Add warning when multi-thread decompression is requested (#3208)
When user pass in argument for both decompression and multi-thread, print a warning message to indicate that multi-threaded decompression is not supported. * Add warning when multi-thread decompression is requested * add test case for multi-threaded decoding warning Expectation is for -d -T0 we will not throw any warning, and see warning for any other -d -T(>1) inputs
This commit is contained in:
@ -1226,6 +1226,9 @@ int main(int argCount, const char* argv[])
|
||||
DISPLAYLEVEL(3, WELCOME_MESSAGE);
|
||||
|
||||
#ifdef ZSTD_MULTITHREAD
|
||||
if ((operation==zom_decompress) && (!singleThread) && (nbWorkers > 1)) {
|
||||
DISPLAYLEVEL(2, "Warning : decompression does not support multi-threading\n");
|
||||
}
|
||||
if ((nbWorkers==0) && (!singleThread)) {
|
||||
/* automatically set # workers based on # of reported cpus */
|
||||
if (defaultLogicalCores) {
|
||||
|
Reference in New Issue
Block a user