]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common: expose set_coroutine for crimson future specializations/wrappers
authorSamuel Just <sjust@redhat.com>
Wed, 31 Jan 2024 23:32:30 +0000 (15:32 -0800)
committerSamuel Just <sjust@redhat.com>
Thu, 29 Feb 2024 23:02:38 +0000 (15:02 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/common/errorator.h
src/crimson/common/interruptible_future.h

index 692498b75aed81c7823c5af5e58b936865b78353..7e7d2c64a2d6a6326b0c705469810ac54c634047 100644 (file)
@@ -607,6 +607,10 @@ private:
                     "ErrorT is not enlisted in errorator");
     }
 
+    void set_coroutine(seastar::task& coroutine) noexcept {
+      base_t::set_coroutine(coroutine);
+    }
+
     template <class ValueFuncT, class ErrorVisitorT>
     auto safe_then(ValueFuncT&& valfunc, ErrorVisitorT&& errfunc) {
       static_assert((... && std::is_invocable_v<ErrorVisitorT,
index 5f8323a66d14f497c79ee7741721180373bb0a93..ec49eac0b0fc0e9351febed266b78b42a17a50c0 100644 (file)
@@ -420,6 +420,10 @@ public:
     : core_type(std::move(base))
   {}
 
+  void set_coroutine(seastar::task& coroutine) noexcept {
+    core_type::set_coroutine(coroutine);
+  }
+
   using value_type = typename seastar::future<T>::value_type;
   using tuple_type = typename seastar::future<T>::tuple_type;
 
@@ -773,6 +777,10 @@ public:
     : core_type(::seastar::futurize<core_type>::make_exception_future(std::move(ep))) {
   }
 
+  void set_coroutine(seastar::task& coroutine) noexcept {
+    core_type::set_coroutine(coroutine);
+  }
+
   template<bool interruptible = true, typename ValueInterruptCondT, typename ErrorVisitorT,
           std::enable_if_t<!interruptible, int> = 0>
   [[gnu::always_inline]]