Get the start of the next batch and the batch size. Important, may be a number larger than available number of tests
| 369 | /// Get the start of the next batch and the batch size. |
| 370 | /// Important, may be a number larger than available number of tests |
| 371 | std::pair<size_t, size_t> next_batch() { |
| 372 | const size_t current_start = next_tests.load(); |
| 373 | const size_t batch_size = choose_batch_size(tests.size() - current_start, running_threads); |
| 374 | const size_t next_start = next_tests.fetch_add(batch_size); |
| 375 | return std::make_pair(next_start, batch_size); |
| 376 | } |
| 377 | |
| 378 | /// True iff the runners should continue running tests |
| 379 | bool continue_testing() { |