From 2ff781b25fdcc5bb3e030865826c8ca88a5a8338 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 27 Sep 2013 12:55:13 -0700 Subject: [PATCH] Remove LockFreeStack::size --- beast/intrusive/LockFreeStack.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/beast/intrusive/LockFreeStack.h b/beast/intrusive/LockFreeStack.h index a765bbf9ea..9d64662e54 100644 --- a/beast/intrusive/LockFreeStack.h +++ b/beast/intrusive/LockFreeStack.h @@ -188,15 +188,6 @@ public: return m_head.get() == &m_end; } - /** Return the number of elements in the stack. - Thread safety: - Safe to call from any thread. - */ - size_type size () const - { - return m_size.get (); - } - /** Push a node onto the stack. The caller is responsible for preventing the ABA problem. This operation is lock-free. @@ -219,7 +210,6 @@ public: node->m_next = head; } while (!m_head.compareAndSetBool (node, head)); - ++m_size; return first; } @@ -244,7 +234,6 @@ public: head = node->m_next.get (); } while (!m_head.compareAndSetBool (head, node)); - --m_size; return static_cast (node); } @@ -288,7 +277,6 @@ public: private: Node m_end; - Atomic m_size; Atomic m_head; };