]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os: instantiate future_type<> with future_stored_type
authorKefu Chai <kchai@redhat.com>
Wed, 9 Sep 2020 03:25:03 +0000 (11:25 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 9 Sep 2020 05:27:25 +0000 (13:27 +0800)
to accommodate the change on seastar's side, which started to use
monostate for representing `void` return type, and hide this convention
using future_stored_type_t.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/os/alienstore/thread_pool.h

index f8d773319c78facb05383f225df691868de009c2..27840da189101713043561c5fbe0302f99d29938 100644 (file)
@@ -24,9 +24,10 @@ struct WorkItem {
 template<typename Func>
 struct Task final : WorkItem {
   using T = std::invoke_result_t<Func>;
-  using future_state_t = std::conditional_t<std::is_void_v<T>,
-                                           seastar::future_state<>,
-                                           seastar::future_state<T>>;
+  using future_stored_type_t =
+    std::conditional_t<std::is_void_v<T>,
+                      seastar::internal::future_stored_type_t<>,
+                      seastar::internal::future_stored_type_t<T>>;
   using futurator_t = seastar::futurize<T>;
 public:
   explicit Task(Func&& f)
@@ -56,7 +57,7 @@ public:
   }
 private:
   Func func;
-  future_state_t state;
+  seastar::future_state<future_stored_type_t> state;
   seastar::readable_eventfd on_done;
 };