From: Kefu Chai Date: Fri, 4 Mar 2022 17:36:36 +0000 (+0800) Subject: crimson/common: specialize seastar::is_future<> for interruptible_future<> X-Git-Tag: v18.0.0~1300^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d97ea8e55d84dfe27cb5d9027c1683a920dae2b4;p=ceph.git 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 --- diff --git a/src/crimson/common/interruptible_future.h b/src/crimson/common/interruptible_future.h index d7f09b6dfa08..517039b32692 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