]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common: add interruptible_errorator::make_interruptible
authorSamuel Just <sjust@redhat.com>
Sun, 4 Feb 2024 06:46:34 +0000 (22:46 -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/interruptible_future.h

index ff80d71257ed85976fcec88cf7bf082dca017a97..290de440949c0aa16d5c4dd2f6d576be30a51ae3 100644 (file)
@@ -694,6 +694,12 @@ struct interruptible_errorator {
        Errorator::template make_ready_future<ValueT>(
          std::forward<A>(value)...));
   }
+
+  template <template <typename> typename FutureType, typename ValueT>
+  static future<ValueT> make_interruptible(FutureType<ValueT> &&fut) {
+    return std::move(fut);
+  }
+
   static interruptible_future_detail<
     InterruptCond,
     typename Errorator::template future<>> now() {