Mercurial > hg > vamp-build-and-test
diff DEPENDENCIES/generic/include/boost/log/sinks/async_frontend.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/log/sinks/async_frontend.hpp Fri Sep 04 12:01:02 2015 +0100 +++ b/DEPENDENCIES/generic/include/boost/log/sinks/async_frontend.hpp Mon Sep 07 11:12:49 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright Andrey Semashev 2007 - 2013. + * Copyright Andrey Semashev 2007 - 2015. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) @@ -30,7 +30,7 @@ #include <boost/smart_ptr/shared_ptr.hpp> #include <boost/smart_ptr/make_shared_object.hpp> #include <boost/thread/locks.hpp> -#include <boost/thread/mutex.hpp> +#include <boost/thread/recursive_mutex.hpp> #include <boost/thread/thread.hpp> #include <boost/thread/condition_variable.hpp> #include <boost/log/exceptions.hpp> @@ -86,7 +86,6 @@ template< typename SinkBackendT, typename QueueingStrategyT = unbounded_fifo_queue > class asynchronous_sink : public aux::make_sink_frontend_base< SinkBackendT >::type, - private boost::log::aux::locking_ptr_counter_base, public QueueingStrategyT { typedef typename aux::make_sink_frontend_base< SinkBackendT >::type base_type; @@ -94,7 +93,7 @@ private: //! Backend synchronization mutex type - typedef boost::mutex backend_mutex_type; + typedef boost::recursive_mutex backend_mutex_type; //! Frontend synchronization mutex type typedef typename base_type::mutex_type frontend_mutex_type; @@ -187,7 +186,7 @@ #ifndef BOOST_LOG_DOXYGEN_PASS //! A pointer type that locks the backend until it's destroyed - typedef boost::log::aux::locking_ptr< sink_backend_type > locked_backend_ptr; + typedef boost::log::aux::locking_ptr< sink_backend_type, backend_mutex_type > locked_backend_ptr; #else // BOOST_LOG_DOXYGEN_PASS @@ -271,9 +270,7 @@ */ locked_backend_ptr locked_backend() { - return locked_backend_ptr( - m_pBackend, - static_cast< boost::log::aux::locking_ptr_counter_base& >(*this)); + return locked_backend_ptr(m_pBackend, m_BackendMutex); } /*! @@ -425,18 +422,13 @@ boost::thread(boost::bind(&asynchronous_sink::run, this)).swap(m_DedicatedFeedingThread); } - // locking_ptr_counter_base methods - void lock() { m_BackendMutex.lock(); } - bool try_lock() { return m_BackendMutex.try_lock(); } - void unlock() { m_BackendMutex.unlock(); } - //! The record feeding loop void do_feed_records() { while (!m_StopRequested) { record_view rec; - register bool dequeued = false; + bool dequeued = false; if (!m_FlushRequested) dequeued = queue_base_type::try_dequeue_ready(rec); else