#include #include #include #include #include void test() { for (unsigned int i = 0; i < 100000; ++i) { const DcmTag tag(DCM_AccessionNumber); tag.getVR(); } } int main (int argc, char** argv) { const unsigned int numberOfThreads = 50; std::list threads; for (unsigned int i = 0; i < numberOfThreads; ++i) threads.push_back(std::thread(test)); for (std::thread& thread: threads) thread.join(); return EXIT_SUCCESS; }