Fawkes API
Fawkes Development Version
|
Queue with a lock. More...
#include <>>
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. |
Queue with a lock.
This class provides a queue that has an intrinsic lock. The lock can be applied with the regular locking methods.
fawkes::LockQueue::LockQueue | ( | ) |
Constructor.
Definition at line 97 of file lock_queue.h.
fawkes::LockQueue::LockQueue | ( | const LockQueue< Type > & | ll | ) |
fawkes::LockQueue::~LockQueue | ( | ) | [virtual] |
Destructor.
Definition at line 109 of file lock_queue.h.
void fawkes::LockQueue::clear | ( | ) |
Clear the queue.
Definition at line 158 of file lock_queue.h.
Referenced by fawkes::BlackBoardNetworkHandler::~BlackBoardNetworkHandler(), fawkes::ConfigNetworkHandler::~ConfigNetworkHandler(), and BBLoggerThread::init().
void fawkes::LockQueue::lock | ( | ) | const |
Lock queue.
Definition at line 115 of file lock_queue.h.
Referenced by firevision::FuseClient::loop(), firevision::FuseNetworkTransceiver::send(), firevision::FuseNetworkTransceiver::recv(), fawkes::ConnectionDispatcher::on_message_received(), fawkes::InterfaceDispatcher::on_data_changed(), fawkes::InterfaceDispatcher::on_message_received(), fawkes::InterfaceDispatcher::on_writer_added(), fawkes::InterfaceDispatcher::on_writer_removed(), fawkes::InterfaceDispatcher::on_reader_added(), fawkes::InterfaceDispatcher::on_reader_removed(), fawkes::FawkesNetworkClientRecvThread::recv(), fawkes::FawkesNetworkServerThread::loop(), fawkes::FawkesNetworkTransceiver::send(), and fawkes::FawkesNetworkTransceiver::recv().
Get access to the internal mutex.
Can be used with MutexLocker.
Definition at line 72 of file lock_queue.h.
void fawkes::LockQueue::pop_locked | ( | ) |
Pop element from queue with lock protection.
Definition at line 149 of file lock_queue.h.
Referenced by fawkes::BlackBoardNetworkHandler::loop(), fawkes::PluginNetworkHandler::loop(), and fawkes::ConfigNetworkHandler::loop().
void fawkes::LockQueue::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 fawkes::BlackBoardNetworkHandler::handle_network_message(), fawkes::PluginNetworkHandler::handle_network_message(), fawkes::ConfigNetworkHandler::handle_network_message(), firevision::FuseClient::enqueue(), firevision::FuseClient::enqueue_and_wait(), fawkes::AvahiThread::publish_service(), fawkes::AvahiThread::unpublish_service(), fawkes::AvahiThread::watch_service(), fawkes::AvahiThread::unwatch_service(), and fawkes::FawkesNetworkServerThread::dispatch().
bool fawkes::LockQueue::try_lock | ( | ) | const |
Try to lock queue.
Definition at line 123 of file lock_queue.h.
void fawkes::LockQueue::unlock | ( | ) | const |
Unlock list.
Definition at line 131 of file lock_queue.h.
Referenced by firevision::FuseClient::loop(), firevision::FuseNetworkTransceiver::send(), firevision::FuseNetworkTransceiver::recv(), fawkes::ConnectionDispatcher::on_message_received(), fawkes::InterfaceDispatcher::on_data_changed(), fawkes::InterfaceDispatcher::on_message_received(), fawkes::InterfaceDispatcher::on_writer_added(), fawkes::InterfaceDispatcher::on_writer_removed(), fawkes::InterfaceDispatcher::on_reader_added(), fawkes::InterfaceDispatcher::on_reader_removed(), fawkes::FawkesNetworkClientRecvThread::recv(), fawkes::FawkesNetworkServerThread::loop(), fawkes::FawkesNetworkTransceiver::send(), and fawkes::FawkesNetworkTransceiver::recv().