Skip to content

Commit 978e9c8

Browse files
committed
crimson/common/smp_helpers: cleanup invoke_on_all_seq
Signed-off-by: Matan Breizman <[email protected]>
1 parent 87d2085 commit 978e9c8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/crimson/common/smp_helpers.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ namespace crimson {
2121
using core_id_t = seastar::shard_id;
2222
static constexpr core_id_t NULL_CORE = std::numeric_limits<core_id_t>::max();
2323

24+
/**
25+
* submit_to
26+
*
27+
* Transparently deal with vanilla and errorated futures
28+
*/
2429
auto submit_to(core_id_t core, auto &&f) {
2530
using ret_type = decltype(f());
2631
if constexpr (is_errorated_future_v<ret_type>) {
@@ -56,12 +61,7 @@ auto proxy_method_on_core(
5661
template <typename F>
5762
auto invoke_on_all_seq(F f) -> decltype(seastar::futurize_invoke(f)) {
5863
for (auto core: seastar::smp::all_cpus()) {
59-
using ret_type = decltype(f());
60-
if constexpr (is_errorated_future_v<ret_type>) {
6164
co_await crimson::submit_to(core, [&f] { return seastar::futurize_invoke(f);});
62-
} else {
63-
co_await seastar::smp::submit_to(core, [&f] { return seastar::futurize_invoke(f);});
64-
}
6565
}
6666
}
6767

0 commit comments

Comments
 (0)