mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add LockFreeStack::empty
This commit is contained in:
@@ -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.
|
/** Return the number of elements in the stack.
|
||||||
Thread safety:
|
Thread safety:
|
||||||
Safe to call from any thread.
|
Safe to call from any thread.
|
||||||
|
|||||||
Reference in New Issue
Block a user