From d97ea8e55d84dfe27cb5d9027c1683a920dae2b4 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 5 Mar 2022 01:36:36 +0800 Subject: [PATCH] crimson/common: specialize seastar::is_future<> for interruptible_future<> this ensures that seastar helper functions are able to accept interruptible_future<> in place of vanilla seastar::future<>. for instance, if concepts is enabled, seastar::when_all_succeed() has a set of constraits which include: is_future>::value where i is the iterator passed to this function. so, to ensure seastar::when_all_succeed() works with interruptible_future, we need to teach the is_future<> to accept interruptible_future as well. Signed-off-by: Kefu Chai --- src/crimson/common/interruptible_future.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/crimson/common/interruptible_future.h b/src/crimson/common/interruptible_future.h index d7f09b6dfa086..517039b326926 100644 --- a/src/crimson/common/interruptible_future.h +++ b/src/crimson/common/interruptible_future.h @@ -1556,4 +1556,10 @@ struct continuation_base_from_future< using type = typename seastar::continuation_base_from_future::type; }; +template +struct is_future< + ::crimson::interruptible::interruptible_future_detail< + InterruptCond, + FutureType>> + : std::true_type {}; } // namespace seastar -- 2.39.5