Skip to content

Commit

Permalink
treewide: use coroutine::parallel_for_each(range) when appropriate
Browse files Browse the repository at this point in the history
`coroutine::parallel_for_each` accepts both a range and a pair of
iterators. let's use the former when appropriate. it is simpler this way.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Dec 2, 2024
1 parent c407bc5 commit 40abebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sstables_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ future<> sstable_streamer::stream_sstable_mutations(streaming::plan_id ops_uuid,
}
co_await reader.close();
try {
co_await coroutine::parallel_for_each(metas.begin(), metas.end(), [failed] (std::pair<const gms::inet_address, send_meta_data>& pair) {
co_await coroutine::parallel_for_each(metas, [failed] (std::pair<const gms::inet_address, send_meta_data>& pair) {
auto& meta = pair.second;
return meta.finish(failed);
});
Expand Down

0 comments on commit 40abebe

Please sign in to comment.