Fawkes API
Fawkes Development Version
|
Queue with a lock. More...
#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 44 of file lock_queue.h.
fawkes::LockQueue< Type >::LockQueue | ( | ) |
Constructor.
Definition at line 97 of file lock_queue.h.
fawkes::LockQueue< Type >::LockQueue | ( | const LockQueue< Type > & | ll | ) |
|
virtual |
Destructor.
Definition at line 108 of file lock_queue.h.
void fawkes::LockQueue< Type >::clear | ( | ) |
Clear the queue.
Definition at line 153 of file lock_queue.h.
Referenced by BBLoggerThread::init(), fawkes::BlackBoardNetworkHandler::~BlackBoardNetworkHandler(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
void fawkes::LockQueue< Type >::lock | ( | ) | const |
Lock queue.
Definition at line 114 of file lock_queue.h.
Referenced by fawkes::LockQueue< ClientData >::clear(), fawkes::LockQueue< ClientData >::lock(), fawkes::FawkesNetworkServerThread::loop(), firevision::FuseClient::loop(), SkillerExecutionThread::loop(), fawkes::ConnectionDispatcher::on_message_received(), fawkes::LockQueue< ClientData >::pop_locked(), fawkes::LockQueue< ClientData >::push_locked(), fawkes::FawkesNetworkTransceiver::recv(), firevision::FuseNetworkTransceiver::recv(), fawkes::FawkesNetworkClientRecvThread::recv(), fawkes::FawkesNetworkTransceiver::send(), and firevision::FuseNetworkTransceiver::send().
|
inline |
Get access to the internal mutex.
Can be used with MutexLocker.
Definition at line 74 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 144 of file lock_queue.h.
Referenced by fawkes::BlackBoardNetworkHandler::loop(), fawkes::ConfigNetworkHandler::loop(), and fawkes::PluginNetworkHandler::loop().
void fawkes::LockQueue< Type >::push_locked | ( | const Type & | x | ) |
Push element to queue with lock protection.
x | element to add |
Definition at line 135 of file lock_queue.h.
Referenced by fawkes::FawkesNetworkServerThread::dispatch(), firevision::FuseClient::enqueue(), firevision::FuseClient::enqueue_and_wait(), fawkes::BlackBoardNetworkHandler::handle_network_message(), fawkes::ConfigNetworkHandler::handle_network_message(), fawkes::PluginNetworkHandler::handle_network_message(), fawkes::AvahiThread::unwatch_service(), and fawkes::AvahiThread::watch_service().
bool fawkes::LockQueue< Type >::try_lock | ( | ) | const |
Try to lock queue.
Definition at line 121 of file lock_queue.h.
Referenced by fawkes::LockQueue< ClientData >::try_lock().
void fawkes::LockQueue< Type >::unlock | ( | ) | const |
Unlock list.
Definition at line 128 of file lock_queue.h.
Referenced by fawkes::FawkesNetworkServerThread::loop(), firevision::FuseClient::loop(), SkillerExecutionThread::loop(), fawkes::ConnectionDispatcher::on_message_received(), fawkes::FawkesNetworkTransceiver::recv(), firevision::FuseNetworkTransceiver::recv(), fawkes::FawkesNetworkClientRecvThread::recv(), fawkes::FawkesNetworkTransceiver::send(), firevision::FuseNetworkTransceiver::send(), and fawkes::LockQueue< ClientData >::unlock().