Fawkes API
Fawkes Development Version
|
Queue with a read/write lock. More...
#include <>>
Public Member Functions | |
RWLockQueue () | |
Constructor. More... | |
RWLockQueue (const RWLockQueue< Type > &ll) | |
Copy constructor. More... | |
virtual | ~RWLockQueue () |
Destructor. More... | |
void | lock_for_read () |
Lock queue for reading. More... | |
void | lock_for_write () |
Lock queue for writing. More... | |
bool | try_lock_for_read () |
Try to lock queue for reading. More... | |
bool | try_lock_for_write () |
Try to lock queue for writing. More... | |
void | unlock () |
Unlock list. More... | |
RefPtr< ReadWriteLock > | rwlock () const |
Get access to the internal rwlock. More... | |
void | push_locked (const Type &x) |
Push element to queue with lock protection. More... | |
void | pop_locked () |
Pop element from queue with lock protection. More... | |
void | clear () |
Clear the queue. More... | |
Queue with a read/write lock.
This class provides a queue that has an intrinsic lock. The lock can be applied with the regular locking methods.
Definition at line 35 of file rwlock_queue.h.
fawkes::RWLockQueue< Type >::RWLockQueue | ( | ) |
Constructor.
Definition at line 72 of file rwlock_queue.h.
fawkes::RWLockQueue< Type >::RWLockQueue | ( | const RWLockQueue< Type > & | ll | ) |
|
virtual |
Destructor.
Definition at line 88 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::clear | ( | ) |
Clear the queue.
Definition at line 163 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::lock_for_read | ( | ) |
Lock queue for reading.
Definition at line 96 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::lock_for_write | ( | ) |
Lock queue for writing.
Definition at line 104 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::pop_locked | ( | ) |
Pop element from queue with lock protection.
Definition at line 153 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::push_locked | ( | const Type & | x | ) |
Push element to queue with lock protection.
x | element to add |
Definition at line 142 of file rwlock_queue.h.
ReadWriteLock * fawkes::RWLockQueue< Type >::rwlock | ( | ) | const |
Get access to the internal rwlock.
Can be used with RwlockLocker.
Definition at line 178 of file rwlock_queue.h.
bool fawkes::RWLockQueue< Type >::try_lock_for_read | ( | ) |
Try to lock queue for reading.
Definition at line 114 of file rwlock_queue.h.
bool fawkes::RWLockQueue< Type >::try_lock_for_write | ( | ) |
Try to lock queue for writing.
Definition at line 124 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::unlock | ( | ) |
Unlock list.
Definition at line 132 of file rwlock_queue.h.