Add LockFreeStack::empty

This commit is contained in:
Vinnie Falco
2013-09-26 14:44:42 -07:00
parent 9c61a6df62
commit 7e4c834c0e

View File

@@ -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.