Add LockFreeStack::empty

This commit is contained in:
Vinnie Falco
2013-09-26 14:44:42 -07:00
parent d939c039f1
commit fb6a0f10c3

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.