[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:46:46 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=ebfd26f
The following commit has been merged in the master branch:
commit ebfd26fb75ffe3ab740e951dd3c683e336af56a0
Author: Robin Mills <robin at clanmills.com>
Date: Sun Aug 21 09:50:05 2016 +0000
#1207 Dynamically new/delete thread array in mt-test.cpp
---
samples/mt-test.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/samples/mt-test.cpp b/samples/mt-test.cpp
index 1771156..9416871 100644
--- a/samples/mt-test.cpp
+++ b/samples/mt-test.cpp
@@ -64,20 +64,19 @@ int main(int argc,const char* argv[])
Exiv2::XmpParser::initialize();
// bucket of threads
- const int TMAX=1000;
- std::thread threads[TMAX];
- int argm = argc > TMAX ? TMAX : argc;
+ std::thread* threads = new std::thread[argc+1];
// spin up the treads
- for ( int arg = 1 ; arg < argm ; arg++ ) {
+ for ( int arg = 1 ; arg < argc ; arg++ ) {
threads[arg] = std::thread(reportExifMetadataCount,arg,argv);
}
// wait for them to finish
- for ( int arg = 1 ; arg < argm ; arg++ ) {
+ for ( int arg = 1 ; arg < argc ; arg++ ) {
if ( threads[arg].joinable() )
threads[arg].join();
}
+ delete [] threads;
}
return result;
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list