85 #include "../base/condition_variable.h"
86 #include "../base/functional.h"
87 #include "../base/macros.h"
202 void clear() noexcept;
211 void reset_interrupted() noexcept;
214 struct Request final {
215 enum class Status : uint8_t {
222 int64_t generation{0};
223 Status status{Status::kPending};
233 return left->seq < right->seq;
238 bool is_interrupted_{
false};
239 int64_t request_seq_{0};
240 int64_t generation_{0};
241 mutable std::mutex mtx_;
242 std::set<RequestPtr, Request::Compare> request_set_;
Thread-safe coordinator that pairs RPC requests with their acknowledgements.
Definition: ack_manager.h:102
AckManager() noexcept
Constructs an empty manager.
std::shared_ptr< Request > RequestPtr
Shared handle representing a single in-flight RPC request.
Definition: ack_manager.h:132
Move-only type-erased callable analogue of std::move_only_function with pool spill.
Definition: functional.h:135
#define VUNLIKELY(...)
Short alias for VLINK_UNLIKELY.
Definition: macros.h:289
#define VLINK_EXPORT
Definition: macros.h:81
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
std::condition_variable ConditionVariable
Definition: condition_variable.h:613
@ kCancelled
Terminal: task was cancelled before its callback executed.
Definition: ack_manager.h:227
bool operator()(const RequestPtr &left, const RequestPtr &right) const noexcept
Definition: ack_manager.h:228