File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ namespace crimson {
2121using core_id_t = seastar::shard_id;
2222static 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+ */
2429auto 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(
5661template <typename F>
5762auto 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
You can’t perform that action at this time.
0 commit comments