comparison DEPENDENCIES/generic/include/boost/log/sinks/bounded_fifo_queue.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
1 /* 1 /*
2 * Copyright Andrey Semashev 2007 - 2013. 2 * Copyright Andrey Semashev 2007 - 2015.
3 * Distributed under the Boost Software License, Version 1.0. 3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at 4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt) 5 * http://www.boost.org/LICENSE_1_0.txt)
6 */ 6 */
7 /*! 7 /*!
137 const std::size_t size = m_queue.size(); 137 const std::size_t size = m_queue.size();
138 if (size > 0) 138 if (size > 0)
139 { 139 {
140 rec.swap(m_queue.front()); 140 rec.swap(m_queue.front());
141 m_queue.pop(); 141 m_queue.pop();
142 if (size == MaxQueueSizeV) 142 overflow_strategy::on_queue_space_available();
143 overflow_strategy::on_queue_space_available();
144 return true; 143 return true;
145 } 144 }
146 145
147 return false; 146 return false;
148 } 147 }
157 const std::size_t size = m_queue.size(); 156 const std::size_t size = m_queue.size();
158 if (size > 0) 157 if (size > 0)
159 { 158 {
160 rec.swap(m_queue.front()); 159 rec.swap(m_queue.front());
161 m_queue.pop(); 160 m_queue.pop();
162 if (size == MaxQueueSizeV) 161 overflow_strategy::on_queue_space_available();
163 overflow_strategy::on_queue_space_available();
164 return true; 162 return true;
165 } 163 }
166 else 164 else
167 { 165 {
168 m_cond.wait(lock); 166 m_cond.wait(lock);