]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common/interruptible_future: introduce si_then as shorthand for safe_then_int...
authorSamuel Just <sjust@redhat.com>
Thu, 3 Jun 2021 21:49:56 +0000 (14:49 -0700)
committerSamuel Just <sjust@redhat.com>
Wed, 23 Jun 2021 18:23:35 +0000 (18:23 +0000)
safe_then_interruptible is too long for common use within seastore.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/common/interruptible_future.h

index 9bc6bb900bab6a3bbb15ebe46becbcab2cba775b..6ebabf1b4b2ac79f953c9dbc4a0943006716fa96 100644 (file)
@@ -592,6 +592,11 @@ public:
     return (interrupt_futurize_t<decltype(fut)>)(std::move(fut));
   }
 
+  template <typename... Args>
+  auto si_then(Args&&... args) {
+    return safe_then_interruptible(std::forward<Args>(args)...);
+  }
+
 
   template<bool interruptible = true, typename ValueInterruptCondT, typename ErrorVisitorT,
           typename U = T, std::enable_if_t<!std::is_void_v<U> && interruptible, int> = 0>