1
0
Fork 0
mirror of https://github.com/KingDuckZ/incredis synced 2024-12-27 21:35:42 +00:00

Rename replies_requested() into replies_ready().

This commit is contained in:
King_DuckZ 2016-12-06 18:41:02 +00:00
parent a6fab83296
commit 7440745ea2
2 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ namespace redis {
ConstReplies replies ( void ) const;
Replies replies_nonconst ( void );
bool replies_requested ( void ) const;
bool replies_ready ( void ) const;
void throw_if_failed ( void );
template <typename... Args>

View file

@ -198,12 +198,12 @@ namespace redis {
m_async_conn->wakeup_event_thread();
}
bool Batch::replies_requested() const {
bool Batch::replies_ready() const {
return static_cast<bool>(0 == m_local_data->local_pending_futures);
}
auto Batch::replies() const -> ConstReplies {
if (not replies_requested()) {
if (not replies_ready()) {
if (m_local_data->local_pending_futures > 0) {
std::unique_lock<std::mutex> u_lock(m_local_data->pending_futures_mutex);
m_local_data->no_more_pending_futures.wait(u_lock, [this]() { return m_local_data->local_pending_futures == 0; });