occasionally copy the contents of the past set.
| 204 | |
| 205 | // occasionally copy the contents of the past set. |
| 206 | void testCopier(std::shared_ptr<TestSet> set, std::chrono::seconds runFor) { |
| 207 | auto start = Clock::now(); |
| 208 | while (true) { |
| 209 | if (Clock::now() - start > runFor) { |
| 210 | return; |
| 211 | } |
| 212 | auto copy = set->copy(); |
| 213 | numCopied.fetch_add(copy.size()); |
| 214 | std::this_thread::sleep_for(std::chrono::milliseconds(10)); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | // In a loop adds and removes a set of objects to the set |
| 219 | void writer(std::shared_ptr<TestSet> set, std::chrono::seconds runFor) { |
no test coverage detected