From 0dc16c691d208c904468ba4a2779bbe3a2b4dc4b Mon Sep 17 00:00:00 2001 From: Igor Pavlov Date: Sun, 7 Dec 2014 00:00:00 +0000 Subject: 9.35 --- CPP/7zip/Archive/Zip/ZipUpdate.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CPP/7zip/Archive/Zip') diff --git a/CPP/7zip/Archive/Zip/ZipUpdate.cpp b/CPP/7zip/Archive/Zip/ZipUpdate.cpp index 2978e387..97cce5ac 100644 --- a/CPP/7zip/Archive/Zip/ZipUpdate.cpp +++ b/CPP/7zip/Archive/Zip/ZipUpdate.cpp @@ -534,13 +534,14 @@ static HRESULT Update2( #ifndef _7ZIP_ST - const size_t kNumMaxThreads = (1 << 10); UInt32 numThreads = options->NumThreads; + const UInt32 kNumMaxThreads = 64; if (numThreads > kNumMaxThreads) numThreads = kNumMaxThreads; + if (numThreads > MAXIMUM_WAIT_OBJECTS) // is 64 in Windows (is it 64 in all versions?) + numThreads = MAXIMUM_WAIT_OBJECTS; if (numThreads < 1) numThreads = 1; - const size_t kMemPerThread = (1 << 25); const size_t kBlockSize = 1 << 16; -- cgit v1.2.3