|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85102 - trunk/libs/circular_buffer/test
From: antoshkka_at_[hidden]
Date: 2013-07-22 07:49:49
Author: apolukhin
Date: 2013-07-22 07:49:48 EDT (Mon, 22 Jul 2013)
New Revision: 85102
URL: http://svn.boost.org/trac/boost/changeset/85102
Log:
Make tests of circular_buffer compile with -DBOOST_THREAD_VERSION=4
Text files modified:
trunk/libs/circular_buffer/test/bounded_buffer_comparison.cpp | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
Modified: trunk/libs/circular_buffer/test/bounded_buffer_comparison.cpp
==============================================================================
--- trunk/libs/circular_buffer/test/bounded_buffer_comparison.cpp Mon Jul 22 07:44:10 2013 (r85101)
+++ trunk/libs/circular_buffer/test/bounded_buffer_comparison.cpp 2013-07-22 07:49:48 EDT (Mon, 22 Jul 2013) (r85102)
@@ -36,7 +36,7 @@
explicit bounded_buffer(size_type capacity) : m_unread(0), m_container(capacity) {}
void push_front(param_type item) {
- boost::mutex::scoped_lock lock(m_mutex);
+ boost::unique_lock<boost::mutex> lock(m_mutex);
m_not_full.wait(lock, boost::bind(&bounded_buffer<value_type>::is_not_full, this));
m_container.push_front(item);
++m_unread;
@@ -45,7 +45,7 @@
}
void pop_back(value_type* pItem) {
- boost::mutex::scoped_lock lock(m_mutex);
+ boost::unique_lock<boost::mutex> lock(m_mutex);
m_not_empty.wait(lock, boost::bind(&bounded_buffer<value_type>::is_not_empty, this));
*pItem = m_container[--m_unread];
lock.unlock();
@@ -78,7 +78,7 @@
explicit bounded_buffer_space_optimized(size_type capacity) : m_container(capacity) {}
void push_front(param_type item) {
- boost::mutex::scoped_lock lock(m_mutex);
+ boost::unique_lock<boost::mutex> lock(m_mutex);
m_not_full.wait(lock, boost::bind(&bounded_buffer_space_optimized<value_type>::is_not_full, this));
m_container.push_front(item);
lock.unlock();
@@ -86,7 +86,7 @@
}
void pop_back(value_type* pItem) {
- boost::mutex::scoped_lock lock(m_mutex);
+ boost::unique_lock<boost::mutex> lock(m_mutex);
m_not_empty.wait(lock, boost::bind(&bounded_buffer_space_optimized<value_type>::is_not_empty, this));
*pItem = m_container.back();
m_container.pop_back();
@@ -120,7 +120,7 @@
explicit bounded_buffer_deque_based(size_type capacity) : m_capacity(capacity) {}
void push_front(param_type item) {
- boost::mutex::scoped_lock lock(m_mutex);
+ boost::unique_lock<boost::mutex> lock(m_mutex);
m_not_full.wait(lock, boost::bind(&bounded_buffer_deque_based<value_type>::is_not_full, this));
m_container.push_front(item);
lock.unlock();
@@ -128,7 +128,7 @@
}
void pop_back(value_type* pItem) {
- boost::mutex::scoped_lock lock(m_mutex);
+ boost::unique_lock<boost::mutex> lock(m_mutex);
m_not_empty.wait(lock, boost::bind(&bounded_buffer_deque_based<value_type>::is_not_empty, this));
*pItem = m_container.back();
m_container.pop_back();
@@ -163,7 +163,7 @@
explicit bounded_buffer_list_based(size_type capacity) : m_capacity(capacity) {}
void push_front(param_type item) {
- boost::mutex::scoped_lock lock(m_mutex);
+ boost::unique_lock<boost::mutex> lock(m_mutex);
m_not_full.wait(lock, boost::bind(&bounded_buffer_list_based<value_type>::is_not_full, this));
m_container.push_front(item);
lock.unlock();
@@ -171,7 +171,7 @@
}
void pop_back(value_type* pItem) {
- boost::mutex::scoped_lock lock(m_mutex);
+ boost::unique_lock<boost::mutex> lock(m_mutex);
m_not_empty.wait(lock, boost::bind(&bounded_buffer_list_based<value_type>::is_not_empty, this));
*pItem = m_container.back();
m_container.pop_back();
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk