mirror of
https://github.com/ceph/ceph
synced 2025-01-29 22:43:40 +00:00
crimson/os: instantiate future_type<> with future_stored_type
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>
This commit is contained in:
parent
5563e0584b
commit
ebfed2b1ac
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user