Concurrent queue of WorkPiles.
More...
#include <ThreadSafeStack.hpp>
|
bool | empty () |
| Check if stack is empty. More...
|
|
void | push (T wp) |
| Push a new element to the stack. More...
|
|
bool | try_pop (T *wp) |
| Pop element from stack, if there is any. More...
|
|
bool | pop (T *wp) |
| Pop element from stack. If empty, wait for an element to be pushed. More...
|
|
bool | has (T value) |
| Check if given value is in stack. More...
|
|
size_t | size () |
| Get size of stack. More...
|
|
template<class T>
class rw::common::ThreadSafeStack< T >
Concurrent queue of WorkPiles.
◆ empty()
Check if stack is empty.
- Returns
- true if empty.
◆ has()
Check if given value is in stack.
- Parameters
-
value | [in] the value to look for. |
- Returns
- true if found, false otherwise.
◆ pop()
Pop element from stack. If empty, wait for an element to be pushed.
- Parameters
-
- Returns
- true.
◆ push()
Push a new element to the stack.
- Parameters
-
wp | [in] the element to add to stack. |
◆ size()
Get size of stack.
- Returns
- the current size.
◆ try_pop()
Pop element from stack, if there is any.
- Parameters
-
- Returns
- true.
The documentation for this class was generated from the following file:
- src/rw/common/ThreadSafeStack.hpp