From 7440745ea2633ccc8d2fac25ecfa74a39be2c2a0 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Tue, 6 Dec 2016 18:41:02 +0000 Subject: [PATCH] Rename replies_requested() into replies_ready(). --- include/incredis/batch.hpp | 2 +- src/batch.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/incredis/batch.hpp b/include/incredis/batch.hpp index c6db274..77d7b14 100644 --- a/include/incredis/batch.hpp +++ b/include/incredis/batch.hpp @@ -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 diff --git a/src/batch.cpp b/src/batch.cpp index 131ad8a..6a0ad5f 100644 --- a/src/batch.cpp +++ b/src/batch.cpp @@ -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(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 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; });