mirror of
https://github.com/boostorg/log.git
synced 2026-01-19 04:22:09 +00:00
Use thread_pause from Boost.Atomic in ipc_reliable_message_queue.
This commit is contained in:
@@ -40,11 +40,11 @@
|
||||
#include <boost/atomic/atomic.hpp>
|
||||
#include <boost/atomic/ipc_atomic.hpp>
|
||||
#include <boost/atomic/capabilities.hpp>
|
||||
#include <boost/atomic/thread_pause.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/log/exceptions.hpp>
|
||||
#include <boost/log/utility/ipc/reliable_message_queue.hpp>
|
||||
#include <boost/log/support/exception.hpp>
|
||||
#include <boost/log/detail/pause.hpp>
|
||||
#include <boost/exception/info.hpp>
|
||||
#include <boost/exception/enable_error_info.hpp>
|
||||
#include <boost/interprocess/creation_tags.hpp>
|
||||
@@ -604,7 +604,7 @@ private:
|
||||
}
|
||||
|
||||
if (i < region_init_wait_loops_pause)
|
||||
boost::log::aux::pause();
|
||||
boost::atomics::thread_pause();
|
||||
else if (i < region_init_wait_loops_short_yield)
|
||||
short_yield();
|
||||
else
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
#include <boost/memory_order.hpp>
|
||||
#include <boost/atomic/ipc_atomic.hpp>
|
||||
#include <boost/atomic/capabilities.hpp>
|
||||
#include <boost/atomic/thread_pause.hpp>
|
||||
#include <boost/log/exceptions.hpp>
|
||||
#include <boost/log/utility/ipc/reliable_message_queue.hpp>
|
||||
#include <boost/log/support/exception.hpp>
|
||||
#include <boost/log/detail/pause.hpp>
|
||||
#include <boost/exception/info.hpp>
|
||||
#include <boost/exception/enable_error_info.hpp>
|
||||
#include <boost/align/align_up.hpp>
|
||||
@@ -472,7 +472,7 @@ private:
|
||||
{
|
||||
for (unsigned int j = 0; j < spins; ++j)
|
||||
{
|
||||
boost::log::aux::pause();
|
||||
boost::atomics::thread_pause();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user