From 7e4c834c0e1722a672d4ba9cfa5cca23959b76f6 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 26 Sep 2013 14:44:42 -0700 Subject: [PATCH] Add LockFreeStack::empty --- beast/intrusive/LockFreeStack.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/beast/intrusive/LockFreeStack.h b/beast/intrusive/LockFreeStack.h index c68420480..a765bbf9e 100644 --- a/beast/intrusive/LockFreeStack.h +++ b/beast/intrusive/LockFreeStack.h @@ -182,6 +182,12 @@ public: { } + /** Returns true if the stack is empty. */ + bool empty() const + { + return m_head.get() == &m_end; + } + /** Return the number of elements in the stack. Thread safety: Safe to call from any thread.