]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerMatan Breizman <mbreizma@redhat.com>
Wed, 8 May 2024 07:05:36 +0000 (10:05 +0300)
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 53c4acde1d6b00ed703a71c3137bee92df4be46a)

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 a44c99a1867b908ef88b3b7d8f1e6db10bce8172..e383d792d05d2dabf4b4511f695efc4e2eb8ad54 100644 (file)
@@ -418,6 +418,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;
 
@@ -771,6 +775,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]]