| 72 | } |
| 73 | |
| 74 | void ThreadTestFixture::stopThreads() |
| 75 | { |
| 76 | // This part will be more effective after |
| 77 | // wait_for_all() will be avaliable for futures! |
| 78 | for(auto& f : this->pimpl->futures) |
| 79 | { |
| 80 | if(f.valid() == true) |
| 81 | { |
| 82 | try |
| 83 | { |
| 84 | f.wait(); |
| 85 | } |
| 86 | catch(std::system_error& e) |
| 87 | { |
| 88 | std::cerr << "ERROR: Exception. Error Code: " << e.code() << ", " << e.what() << "\n"; |
| 89 | } |
| 90 | } |
| 91 | }; |
| 92 | } |
| 93 | |
| 94 | uint64_t ThreadTestFixture::run(uint64_t threads, uint64_t calls, const celero::TestFixture::ExperimentValue* const experimentValue) |
| 95 | { |