mirror of
https://github.com/boostorg/thread.git
synced 2026-01-19 04:42:13 +00:00
Thread: fix inspection report.
[SVN r84329]
This commit is contained in:
@@ -143,7 +143,7 @@ namespace
|
||||
{
|
||||
typedef SharedData<Types> S;
|
||||
|
||||
auto best_producer_time = std::numeric_limits<Stopwatch::rep>::max();
|
||||
auto best_producer_time = std::numeric_limits<Stopwatch::rep>::max BOOST_PREVENT_MACRO_SUBSTITUTION ();
|
||||
|
||||
std::vector<std::thread> consumers
|
||||
{ consumer_count };
|
||||
@@ -165,7 +165,7 @@ namespace
|
||||
for (unsigned i = 0; i < consumer_count; ++i)
|
||||
consumers[i].join();
|
||||
|
||||
best_producer_time = std::min(best_producer_time, shared_data.producer_time);
|
||||
best_producer_time = std::min BOOST_PREVENT_MACRO_SUBSTITUTION (best_producer_time, shared_data.producer_time);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ void unique()
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::chrono::high_resolution_clock::duration best_time(std::numeric_limits<boost::chrono::high_resolution_clock::duration::rep>::max());
|
||||
boost::chrono::high_resolution_clock::duration best_time(std::numeric_limits<boost::chrono::high_resolution_clock::duration::rep>::max BOOST_PREVENT_MACRO_SUBSTITUTION ());
|
||||
for (int i =100; i>0; --i) {
|
||||
boost::chrono::high_resolution_clock clock;
|
||||
boost::chrono::high_resolution_clock::time_point s1 = clock.now();
|
||||
@@ -61,7 +61,7 @@ int main()
|
||||
// t13.join();
|
||||
boost::chrono::high_resolution_clock::time_point f1 = clock.now();
|
||||
//std::cout << " Time spent:" << (f1 - s1) << std::endl;
|
||||
best_time = std::min(best_time, f1 - s1);
|
||||
best_time = std::min BOOST_PREVENT_MACRO_SUBSTITUTION (best_time, f1 - s1);
|
||||
|
||||
}
|
||||
std::cout << "Best Time spent:" << best_time << std::endl;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright 2011-2012 Vicente J. Botet Escriba
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Copyright (C) 2011-2013 Vicente J. Botet Escriba
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/thread for documentation.
|
||||
//
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright 2011-2012 Vicente J. Botet Escriba
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Copyright (C) 2011-2013 Vicente J. Botet Escriba
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/thread for documentation.
|
||||
//
|
||||
|
||||
@@ -1552,7 +1552,7 @@ namespace boost
|
||||
static_cast<base_type*>(this)->swap(other);
|
||||
}
|
||||
|
||||
// todo this functioˆn must be private and friendship provided to the internal users.
|
||||
// todo this function must be private and friendship provided to the internal users.
|
||||
void set_async()
|
||||
{
|
||||
this->future_->set_async();
|
||||
|
||||
@@ -179,15 +179,15 @@ namespace boost {
|
||||
BOOST_THREAD_INLINE shared_mutex();
|
||||
BOOST_THREAD_INLINE ~shared_mutex();
|
||||
|
||||
#ifndef BOOST_NO_DELETED_FUNCTIONS
|
||||
#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
shared_mutex(shared_mutex const&) = delete;
|
||||
shared_mutex& operator=(shared_mutex const&) = delete;
|
||||
#else // BOOST_NO_DELETED_FUNCTIONS
|
||||
#else // BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
private:
|
||||
shared_mutex(shared_mutex const&);
|
||||
shared_mutex& operator=(shared_mutex const&);
|
||||
public:
|
||||
#endif // BOOST_NO_DELETED_FUNCTIONS
|
||||
#endif // BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
|
||||
// Exclusive ownership
|
||||
|
||||
|
||||
Reference in New Issue
Block a user