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 75 of file rwlock_queue.h.
fawkes::RWLockQueue< Type >::RWLockQueue | ( | const RWLockQueue< Type > & | ll | ) |
|
virtual |
Destructor.
Definition at line 94 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::clear | ( | ) |
Clear the queue.
Definition at line 177 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::lock_for_read | ( | ) |
Lock queue for reading.
Definition at line 103 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::lock_for_write | ( | ) |
Lock queue for writing.
Definition at line 112 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::pop_locked | ( | ) |
Pop element from queue with lock protection.
Definition at line 166 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 154 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 193 of file rwlock_queue.h.
bool fawkes::RWLockQueue< Type >::try_lock_for_read | ( | ) |
Try to lock queue for reading.
Definition at line 123 of file rwlock_queue.h.
bool fawkes::RWLockQueue< Type >::try_lock_for_write | ( | ) |
Try to lock queue for writing.
Definition at line 134 of file rwlock_queue.h.
void fawkes::RWLockQueue< Type >::unlock | ( | ) |
Unlock list.
Definition at line 143 of file rwlock_queue.h.