EPICS ARCHIVER V4
|
A List that allows concurrent access. More...
#include <ConcurrentList.h>
Public Member Functions | |
ConcurrentPtrList () | |
Construct a new list. More... | |
virtual | ~ConcurrentPtrList () |
Delete list and all its elements. More... | |
OrderedMutex & | getMutex () |
bool | isEmpty (Guard &guard) |
size_t | size (Guard &guard) |
void | add (Guard &guard, void *item) |
Add an item to the list. More... | |
bool | removeIfFound (Guard &guard, void *item) |
Remove an item from the list. More... | |
void | remove (Guard &guard, void *item) |
Remove an item from the list. More... | |
class ConcurrentPtrListIterator | iterator (Guard &guard) |
Obtain iterator, positioned at the start of the list. More... | |
A List that allows concurrent access.
One can add or remove elements while someone else is traversing the list. Of course the list is locked in add(), next(), .., but not for the full duration of traversal.
ConcurrentPtrList::ConcurrentPtrList | ( | ) |
Construct a new list.
|
virtual |
Delete list and all its elements.
void ConcurrentPtrList::add | ( | Guard & | guard, |
void * | item | ||
) |
Add an item to the list.
The position of that item on the list is not necessarily predicatable. Typically at the end, but may be at a 'reused' location.
|
inline |
bool ConcurrentPtrList::isEmpty | ( | Guard & | guard | ) |
class ConcurrentPtrListIterator ConcurrentPtrList::iterator | ( | Guard & | guard | ) |
Obtain iterator, positioned at the start of the list.
void ConcurrentPtrList::remove | ( | Guard & | guard, |
void * | item | ||
) |
Remove an item from the list.
GenericException | if item is not found on the list. |
bool ConcurrentPtrList::removeIfFound | ( | Guard & | guard, |
void * | item | ||
) |
Remove an item from the list.
size_t ConcurrentPtrList::size | ( | Guard & | guard | ) |