14 #include "rofl/common/thread_helper.h"
15 #include "rofl/common/openflow/messages/cofmsg.h"
16 #include "rofl/common/logging.h"
43 RwLock rwlock(queuelock, RwLock::RWLOCK_READ);
52 RwLock rwlock(queuelock, RwLock::RWLOCK_WRITE);
53 while (not queue.empty()) {
64 RwLock rwlock(queuelock, RwLock::RWLOCK_WRITE);
65 rofl::logging::trace <<
"[rofl-common][crofqueue][store] msg: " << std::endl << *msg;
76 RwLock rwlock(queuelock, RwLock::RWLOCK_WRITE);
80 msg = queue.front(); queue.pop_front();
81 rofl::logging::trace <<
"[rofl-common][crofqueue][retrieve] msg: " << std::endl << *msg;
91 RwLock rwlock(queuelock, RwLock::RWLOCK_READ);
96 rofl::logging::trace <<
"[rofl-common][crofqueue][front] msg: " << std::endl << *msg;
105 RwLock rwlock(queuelock, RwLock::RWLOCK_WRITE);
110 rofl::logging::trace <<
"[rofl-common][crofqueue][pop] " << std::endl;
116 operator<< (std::ostream& os,
const crofqueue& queue) {
117 RwLock rwlock(queue.queuelock, RwLock::RWLOCK_READ);
118 os <<
rofl::indent(0) <<
"<crofqueue size #" << queue.queue.size() <<
" >" << std::endl;
120 for (std::list<rofl::openflow::cofmsg*>::const_iterator
121 it = queue.queue.begin(); it != queue.queue.end(); ++it) {
129 std::list<rofl::openflow::cofmsg*> queue;
Definition: thread_helper.h:25
Definition: thread_helper.h:88
Definition: crofqueue.h:20