#include <core/utils/lock_queue.h>
Inheritance diagram for fawkes::LockQueue< Type >:
Public Member Functions | |
LockQueue () | |
Constructor. | |
LockQueue (const LockQueue< Type > &ll) | |
Copy constructor. | |
virtual | ~LockQueue () |
Destructor. | |
void | lock () const |
Lock queue. | |
bool | try_lock () const |
Try to lock queue. | |
void | unlock () const |
Unlock list. | |
RefPtr< Mutex > | mutex () const |
Get access to the internal mutex. | |
void | push_locked (const Type &x) |
Push element to queue with lock protection. | |
void | pop_locked () |
Pop element from queue with lock protection. | |
void | clear () |
Clear the queue. |
This class provides a queue that has an intrinsic lock. The lock can be applied with the regular locking methods.
Definition at line 34 of file lock_queue.h.
fawkes::LockQueue< Type >::LockQueue | ( | ) |
fawkes::LockQueue< Type >::LockQueue | ( | const LockQueue< Type > & | ll | ) |
fawkes::LockQueue< Type >::~LockQueue | ( | ) | [virtual] |
void fawkes::LockQueue< Type >::clear | ( | ) |
Clear the queue.
Definition at line 148 of file lock_queue.h.
Referenced by FuseTransferWidget::FuseTransferWidget(), and BBLoggerThread::init().
void fawkes::LockQueue< Type >::lock | ( | ) | const |
Lock queue.
Definition at line 95 of file lock_queue.h.
Referenced by fawkes::FawkesNetworkServerThread::loop(), firevision::FuseClient::loop(), fawkes::FawkesNetworkTransceiver::recv(), fawkes::FawkesNetworkClientRecvThread::recv(), firevision::FuseNetworkTransceiver::recv(), fawkes::FawkesNetworkTransceiver::send(), and firevision::FuseNetworkTransceiver::send().
RefPtr< Mutex > fawkes::LockQueue< Type >::mutex | ( | ) | const |
Get access to the internal mutex.
Can be used with MutexLocker.
Definition at line 164 of file lock_queue.h.
void fawkes::LockQueue< Type >::pop_locked | ( | ) |
void fawkes::LockQueue< Type >::push_locked | ( | const Type & | x | ) |
Push element to queue with lock protection.
x | element to add |
Definition at line 126 of file lock_queue.h.
Referenced by fawkes::FawkesNetworkServerThread::dispatch(), firevision::FuseClient::enqueue(), firevision::FuseClient::enqueue_and_wait(), FuseTransferWidget::fuse_connection_died(), fawkes::AvahiThread::unwatch_service(), fawkes::AvahiThread::watch_service(), and FuseTransferWidget::~FuseTransferWidget().
bool fawkes::LockQueue< Type >::try_lock | ( | ) | const |
Try to lock queue.
Definition at line 106 of file lock_queue.h.
void fawkes::LockQueue< Type >::unlock | ( | ) | const |
Unlock list.
Definition at line 115 of file lock_queue.h.
Referenced by fawkes::FawkesNetworkServerThread::loop(), firevision::FuseClient::loop(), fawkes::FawkesNetworkTransceiver::recv(), fawkes::FawkesNetworkClientRecvThread::recv(), firevision::FuseNetworkTransceiver::recv(), fawkes::FawkesNetworkTransceiver::send(), and firevision::FuseNetworkTransceiver::send().