1/* 2 * Copyright (c) 2011-2014 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 140 unchanged lines hidden (view full) --- 149void 150AbstractController::wakeUpAllBuffers() 151{ 152 // 153 // Wake up all possible buffers that could be waiting on any message. 154 // 155 156 std::vector<MsgVecType*> wokeUpMsgVecs; |
157 MsgBufType wokeUpMsgBufs; |
158 159 if(m_waiting_buffers.size() > 0) { 160 for (WaitingBufType::iterator buf_iter = m_waiting_buffers.begin(); 161 buf_iter != m_waiting_buffers.end(); 162 ++buf_iter) { 163 for (MsgVecType::iterator vec_iter = buf_iter->second->begin(); 164 vec_iter != buf_iter->second->end(); 165 ++vec_iter) { |
166 // 167 // Make sure the MessageBuffer has not already be reanalyzed 168 // 169 if (*vec_iter != NULL && 170 (wokeUpMsgBufs.count(*vec_iter) == 0)) { |
171 (*vec_iter)->reanalyzeAllMessages(); |
172 wokeUpMsgBufs.insert(*vec_iter); |
173 } 174 } 175 wokeUpMsgVecs.push_back(buf_iter->second); 176 } 177 178 for (std::vector<MsgVecType*>::iterator wb_iter = wokeUpMsgVecs.begin(); 179 wb_iter != wokeUpMsgVecs.end(); 180 ++wb_iter) { --- 175 unchanged lines hidden --- |