let's just use std::for_each() for applying function not returning future
to a range, otherwise we'd have
../src/test/crimson/seastore/test_transaction_manager.cc:950:5: error: no matching function for call to 'parallel_for_each'
seastar::parallel_for_each(
^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/seastar/include/seastar/core/loop.hh:559:1: note: candidate template ignored: constraints not satisfied [with Iterator = boost::iterators::counting_iterator<unsigned int, boost::use_default, boost::use_default>, Sentinel = boost::iterators::counting_iterator<unsigned int, boost::use_default, boost::use_default>, Func = (lambda at ../src/test/crimson/seastore/test_transaction_manager.cc:953:7)]
parallel_for_each(Iterator begin, Sentinel end, Func&& func) noexcept {
^
../src/seastar/include/seastar/core/loop.hh:553:78: note: because type constraint 'std::same_as<void, future<> >' was not satisfied:
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
constexpr size_t BSIZE = 4<<10;
constexpr size_t BLOCKS = TOTAL / BSIZE;
run_async([this] {
- seastar::parallel_for_each(
+ std::for_each(
boost::make_counting_iterator(0u),
boost::make_counting_iterator(WRITE_STREAMS),
[&](auto idx) {
break;
}
}
- }).get0();
+ });
int writes = 0;
unsigned failures = 0;