Fawkes API
Fawkes Development Version
|
#include <>>
Public Member Functions | |
LockQueue () | |
Constructor. More... | |
LockQueue (const LockQueue< Type > &ll) | |
Copy constructor. More... | |
virtual | ~LockQueue () |
Destructor. More... | |
void | lock () const |
Lock queue. More... | |
bool | try_lock () const |
Try to lock queue. More... | |
void | unlock () const |
Unlock list. More... | |
RefPtr< Mutex > | mutex () const |
Get access to the internal mutex. 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 lock. This class provides a queue that has an intrinsic lock. The lock can be applied with the regular locking methods.
Definition at line 48 of file lock_queue.h.
fawkes::LockQueue< Type >::LockQueue | ( | ) |
Constructor.
Definition at line 101 of file lock_queue.h.
fawkes::LockQueue< Type >::LockQueue | ( | const LockQueue< Type > & | ll | ) |
|
virtual |
Destructor.
Definition at line 112 of file lock_queue.h.
void fawkes::LockQueue< Type >::clear | ( | ) |
void fawkes::LockQueue< Type >::lock | ( | ) | const |
Lock queue.
Definition at line 118 of file lock_queue.h.
Referenced by firevision::FuseClient::loop(), SkillerExecutionThread::loop(), fawkes::ConnectionDispatcher::on_connection_died(), firevision::FuseNetworkTransceiver::recv(), fawkes::FawkesNetworkClientRecvThread::recv(), firevision::FuseNetworkTransceiver::send(), fawkes::FawkesNetworkServerClientThread::set_clid(), fawkes::LockQueue< ClientData >::unlock(), and fawkes::LockQueue< ClientData >::~LockQueue().
|
inline |
Get access to the internal mutex.
Can be used with MutexLocker.
Definition at line 78 of file lock_queue.h.
Referenced by oprs_protobuf::OpenPRSProtobuf::oprs_pb_events_pending(), and oprs_protobuf::OpenPRSProtobuf::oprs_pb_process().
void fawkes::LockQueue< Type >::pop_locked | ( | ) |
Pop element from queue with lock protection.
Definition at line 148 of file lock_queue.h.
void fawkes::LockQueue< Type >::push_locked | ( | const Type & | x | ) |
Push element to queue with lock protection.
x | element to add |
Definition at line 139 of file lock_queue.h.
Referenced by firevision::FuseClient::enqueue(), firevision::FuseClient::enqueue_and_wait(), and fawkes::AvahiThread::unwatch_service().
bool fawkes::LockQueue< Type >::try_lock | ( | ) | const |
Try to lock queue.
Definition at line 125 of file lock_queue.h.
Referenced by fawkes::LockQueue< ClientData >::lock().
void fawkes::LockQueue< Type >::unlock | ( | ) | const |
Unlock list.
Definition at line 132 of file lock_queue.h.
Referenced by firevision::FuseClient::loop(), SkillerExecutionThread::loop(), firevision::FuseNetworkTransceiver::recv(), fawkes::FawkesNetworkClientRecvThread::recv(), firevision::FuseNetworkTransceiver::send(), fawkes::FawkesNetworkServerClientThread::set_clid(), and fawkes::LockQueue< ClientData >::try_lock().