mirror of
https://github.com/boostorg/thread.git
synced 2026-02-07 10:52:10 +00:00
Compare commits
38 Commits
boost-1.86
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac15f907be | ||
|
|
e2f6e8789f | ||
|
|
24917577d7 | ||
|
|
6da5c6d418 | ||
|
|
de9eb0ee7d | ||
|
|
f19c0d3b56 | ||
|
|
3d95d2366e | ||
|
|
ed7171099b | ||
|
|
36f63a1b63 | ||
|
|
2a953f1c4b | ||
|
|
c34d1fd2d9 | ||
|
|
be42bd8d10 | ||
|
|
45e77a932f | ||
|
|
b712fac6cc | ||
|
|
ca6b6affec | ||
|
|
a1f89c9518 | ||
|
|
28d58852bb | ||
|
|
4e0a88853a | ||
|
|
5d68c9c42c | ||
|
|
b3183638cb | ||
|
|
48482ff696 | ||
|
|
76411e5918 | ||
|
|
49ccf9c30a | ||
|
|
814ed9f341 | ||
|
|
82aa252a9e | ||
|
|
b1ff784e51 | ||
|
|
e6e4e53807 | ||
|
|
0fc00ec05c | ||
|
|
435a623e48 | ||
|
|
0a8c93842e | ||
|
|
ca4b54f96c | ||
|
|
43bfe9cbd2 | ||
|
|
691b64d5aa | ||
|
|
e2de571359 | ||
|
|
8811487643 | ||
|
|
7e2cd262ce | ||
|
|
637ceec996 | ||
|
|
ee609e8806 |
55
.github/workflows/ci.yml
vendored
55
.github/workflows/ci.yml
vendored
@@ -18,52 +18,71 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- toolset: gcc-4.8
|
- toolset: gcc-4.8
|
||||||
os: ubuntu-latest
|
|
||||||
container: ubuntu:18.04
|
|
||||||
cxxstd: 11
|
cxxstd: 11
|
||||||
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
install: g++-4.8
|
install: g++-4.8
|
||||||
- toolset: gcc-5
|
- toolset: gcc-5
|
||||||
cxxstd: 11
|
cxxstd: 11
|
||||||
os: ubuntu-latest
|
|
||||||
container: ubuntu:18.04
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
install: g++-5
|
install: g++-5
|
||||||
- toolset: gcc-7
|
- toolset: gcc-7
|
||||||
os: ubuntu-20.04
|
container: ubuntu:18.04
|
||||||
install: g++-7
|
os: ubuntu-latest
|
||||||
- toolset: gcc-9
|
- toolset: gcc-9
|
||||||
os: ubuntu-20.04
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
- toolset: gcc-11
|
- toolset: gcc-11
|
||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
|
- toolset: gcc-13
|
||||||
|
os: ubuntu-24.04
|
||||||
|
- toolset: clang
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-15
|
|
||||||
cxxstd: 20
|
|
||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
install: clang-15
|
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
os: macos-11
|
cxxstd: 20
|
||||||
cxxstd: 11
|
os: ubuntu-24.04
|
||||||
- toolset: clang
|
|
||||||
os: macos-12
|
|
||||||
cxxstd: 14
|
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
os: macos-13
|
os: macos-13
|
||||||
|
cxxstd: 11
|
||||||
|
- toolset: clang
|
||||||
|
os: macos-14
|
||||||
|
cxxstd: 14
|
||||||
|
- toolset: clang
|
||||||
|
os: macos-15
|
||||||
cxxstd: 17
|
cxxstd: 17
|
||||||
|
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
container: ${{matrix.container}}
|
|
||||||
|
container:
|
||||||
|
image: ${{matrix.container}}
|
||||||
|
volumes:
|
||||||
|
- /node20217:/node20217:rw,rshared
|
||||||
|
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup container environment
|
- name: Setup container environment
|
||||||
if: matrix.container
|
if: matrix.container
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y install sudo python3 git g++
|
apt-get -y install sudo python3 git g++ curl xz-utils
|
||||||
|
|
||||||
|
- name: Install nodejs20glibc2.17
|
||||||
|
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
|
||||||
|
run: |
|
||||||
|
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
|
||||||
|
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
|
||||||
|
ldd /__e/node20/bin/node
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
if: matrix.install
|
if: matrix.install
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ target_link_libraries(boost_thread
|
|||||||
Boost::predef
|
Boost::predef
|
||||||
Boost::preprocessor
|
Boost::preprocessor
|
||||||
Boost::smart_ptr
|
Boost::smart_ptr
|
||||||
Boost::static_assert
|
|
||||||
Boost::system
|
Boost::system
|
||||||
Boost::throw_exception
|
Boost::throw_exception
|
||||||
Boost::tuple
|
Boost::tuple
|
||||||
|
|||||||
45
build.jam
Normal file
45
build.jam
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# Copyright René Ferdinand Rivera Morell 2023-2024
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
require-b2 5.2 ;
|
||||||
|
|
||||||
|
constant boost_dependencies :
|
||||||
|
/boost/assert//boost_assert
|
||||||
|
/boost/atomic//boost_atomic
|
||||||
|
/boost/bind//boost_bind
|
||||||
|
/boost/chrono//boost_chrono
|
||||||
|
/boost/concept_check//boost_concept_check
|
||||||
|
/boost/config//boost_config
|
||||||
|
/boost/container//boost_container
|
||||||
|
/boost/container_hash//boost_container_hash
|
||||||
|
/boost/core//boost_core
|
||||||
|
/boost/date_time//boost_date_time
|
||||||
|
/boost/exception//boost_exception
|
||||||
|
/boost/function//boost_function
|
||||||
|
/boost/io//boost_io
|
||||||
|
/boost/move//boost_move
|
||||||
|
/boost/optional//boost_optional
|
||||||
|
/boost/predef//boost_predef
|
||||||
|
/boost/preprocessor//boost_preprocessor
|
||||||
|
/boost/smart_ptr//boost_smart_ptr
|
||||||
|
/boost/system//boost_system
|
||||||
|
/boost/throw_exception//boost_throw_exception
|
||||||
|
/boost/tuple//boost_tuple
|
||||||
|
/boost/type_traits//boost_type_traits
|
||||||
|
/boost/utility//boost_utility
|
||||||
|
/boost/winapi//boost_winapi ;
|
||||||
|
|
||||||
|
project /boost/thread
|
||||||
|
;
|
||||||
|
|
||||||
|
explicit
|
||||||
|
[ alias boost_thread : build//boost_thread ]
|
||||||
|
[ alias all : boost_thread example test ]
|
||||||
|
;
|
||||||
|
|
||||||
|
call-if : boost-library thread
|
||||||
|
: install boost_thread
|
||||||
|
;
|
||||||
|
|
||||||
@@ -35,18 +35,22 @@
|
|||||||
import os ;
|
import os ;
|
||||||
import indirect ;
|
import indirect ;
|
||||||
import path ;
|
import path ;
|
||||||
import configure ;
|
import configure ;
|
||||||
import threadapi-feature ;
|
import threadapi-feature ;
|
||||||
|
|
||||||
exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ;
|
exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ;
|
||||||
|
|
||||||
project boost/thread
|
project
|
||||||
: source-location ../src
|
: source-location ../src
|
||||||
|
: common-requirements
|
||||||
|
<library>$(boost_dependencies)
|
||||||
|
<include>../include
|
||||||
: requirements <threading>multi
|
: requirements <threading>multi
|
||||||
#<link>static:<define>BOOST_THREAD_STATIC_LINK=1
|
#<link>static:<define>BOOST_THREAD_STATIC_LINK=1
|
||||||
#<link>shared:<define>BOOST_THREAD_DYN_LINK=1
|
#<link>shared:<define>BOOST_THREAD_DYN_LINK=1
|
||||||
<link>static:<define>BOOST_THREAD_BUILD_LIB=1
|
<link>static:<define>BOOST_THREAD_BUILD_LIB=1
|
||||||
<link>shared:<define>BOOST_THREAD_BUILD_DLL=1
|
<link>shared:<define>BOOST_THREAD_BUILD_DLL=1
|
||||||
|
-<tag>@%boostcpp.tag
|
||||||
-<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
|
-<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
|
||||||
<tag>@$(__name__).tag
|
<tag>@$(__name__).tag
|
||||||
<toolset>gcc:<cxxflags>-Wno-long-long
|
<toolset>gcc:<cxxflags>-Wno-long-long
|
||||||
@@ -139,6 +143,7 @@ project boost/thread
|
|||||||
#<define>BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
|
#<define>BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
|
||||||
#<define>BOOST_SYSTEM_NO_DEPRECATED
|
#<define>BOOST_SYSTEM_NO_DEPRECATED
|
||||||
#<define>BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS
|
#<define>BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS
|
||||||
|
<define>BOOST_THREAD_NO_LIB=1
|
||||||
;
|
;
|
||||||
|
|
||||||
rule tag ( name : type ? : property-set )
|
rule tag ( name : type ? : property-set )
|
||||||
@@ -156,8 +161,15 @@ rule tag ( name : type ? : property-set )
|
|||||||
}
|
}
|
||||||
|
|
||||||
# forward to the boost tagging rule
|
# forward to the boost tagging rule
|
||||||
return [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
|
if $(BOOST_JAMROOT_MODULE)
|
||||||
$(result) : $(type) : $(property-set) ] ;
|
{
|
||||||
|
return [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
|
||||||
|
$(result) : $(type) : $(property-set) ] ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $(result) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rule win32_pthread_paths ( properties * )
|
rule win32_pthread_paths ( properties * )
|
||||||
@@ -269,10 +281,10 @@ rule requirements ( properties * )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
result += <define>BOOST_THREAD_DONT_USE_CHRONO ;
|
result += <define>BOOST_THREAD_DONT_USE_CHRONO ;
|
||||||
if ! [ configure.builds has_atomic_flag_lockfree
|
if ! [ configure.builds has_atomic_flag_lockfree
|
||||||
: $(properties) : "lockfree boost::atomic_flag" ] {
|
: $(properties) : "lockfree boost::atomic_flag" ] {
|
||||||
result += <library>/boost/atomic//boost_atomic ;
|
result += <library>/boost/atomic//boost_atomic ;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if <threadapi>win32 in $(properties)
|
if <threadapi>win32 in $(properties)
|
||||||
{
|
{
|
||||||
@@ -315,5 +327,3 @@ lib boost_thread
|
|||||||
<link>static:<define>BOOST_THREAD_USE_LIB=1
|
<link>static:<define>BOOST_THREAD_USE_LIB=1
|
||||||
<conditional>@usage-requirements
|
<conditional>@usage-requirements
|
||||||
;
|
;
|
||||||
|
|
||||||
boost-install boost_thread ;
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
[/
|
[/
|
||||||
(C) Copyright 20012 Vicente J. Botet Escriba.
|
(C) Copyright 2012 Vicente J. Botet Escriba.
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
http://www.boost.org/LICENSE_1_0.txt).
|
http://www.boost.org/LICENSE_1_0.txt).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[/
|
[/
|
||||||
(C) Copyright 2007-12 Anthony Williams.
|
(C) Copyright 2007-12 Anthony Williams.
|
||||||
(C) Copyright 20012 Vicente J. Botet Escriba.
|
(C) Copyright 2012 Vicente J. Botet Escriba.
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
http://www.boost.org/LICENSE_1_0.txt).
|
http://www.boost.org/LICENSE_1_0.txt).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[/
|
[/
|
||||||
(C) Copyright 2008-9 Anthony Williams.
|
(C) Copyright 2008-9 Anthony Williams.
|
||||||
(C) Copyright 12 Vicente J. Botet Escriba.
|
(C) Copyright 2012 Vicente J. Botet Escriba.
|
||||||
Distributed under the Boost Software License, Version 1.0.
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
(See accompanying file LICENSE_1_0.txt or copy at
|
(See accompanying file LICENSE_1_0.txt or copy at
|
||||||
http://www.boost.org/LICENSE_1_0.txt).
|
http://www.boost.org/LICENSE_1_0.txt).
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
# 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)
|
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
project boost/thread/example
|
project
|
||||||
: requirements <library>../build//boost_thread <threading>multi
|
: requirements <library>../build//boost_thread <threading>multi
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <boost/bind/bind.hpp>
|
#include <boost/bind/bind.hpp>
|
||||||
|
#include <boost/core/ref.hpp>
|
||||||
|
|
||||||
#include <boost/thread/detail/config.hpp>
|
#include <boost/thread/detail/config.hpp>
|
||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
@@ -187,7 +188,7 @@ namespace detail
|
|||||||
template <class ValueType, class Queue>
|
template <class ValueType, class Queue>
|
||||||
bool sync_deque_base<ValueType, Queue>::wait_until_not_empty_or_closed(unique_lock<mutex>& lk)
|
bool sync_deque_base<ValueType, Queue>::wait_until_not_empty_or_closed(unique_lock<mutex>& lk)
|
||||||
{
|
{
|
||||||
cond_.wait(lk, boost::bind(&sync_deque_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk)));
|
cond_.wait(lk, boost::bind(&sync_deque_base<ValueType, Queue>::not_empty_or_closed, this, boost::ref(lk)));
|
||||||
if (! empty(lk)) return false; // success
|
if (! empty(lk)) return false; // success
|
||||||
return true; // closed
|
return true; // closed
|
||||||
}
|
}
|
||||||
@@ -196,7 +197,7 @@ namespace detail
|
|||||||
template <class WClock, class Duration>
|
template <class WClock, class Duration>
|
||||||
queue_op_status sync_deque_base<ValueType, Queue>::wait_until_not_empty_or_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp)
|
queue_op_status sync_deque_base<ValueType, Queue>::wait_until_not_empty_or_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp)
|
||||||
{
|
{
|
||||||
if (! cond_.wait_until(lk, tp, boost::bind(&sync_deque_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk))))
|
if (! cond_.wait_until(lk, tp, boost::bind(&sync_deque_base<ValueType, Queue>::not_empty_or_closed, this, boost::ref(lk))))
|
||||||
return queue_op_status::timeout;
|
return queue_op_status::timeout;
|
||||||
if (! empty(lk)) return queue_op_status::success;
|
if (! empty(lk)) return queue_op_status::success;
|
||||||
return queue_op_status::closed;
|
return queue_op_status::closed;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <boost/bind/bind.hpp>
|
#include <boost/bind/bind.hpp>
|
||||||
|
#include <boost/core/ref.hpp>
|
||||||
|
|
||||||
#include <boost/thread/detail/config.hpp>
|
#include <boost/thread/detail/config.hpp>
|
||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
@@ -187,7 +188,7 @@ namespace detail
|
|||||||
template <class ValueType, class Queue>
|
template <class ValueType, class Queue>
|
||||||
bool sync_queue_base<ValueType, Queue>::wait_until_not_empty_or_closed(unique_lock<mutex>& lk)
|
bool sync_queue_base<ValueType, Queue>::wait_until_not_empty_or_closed(unique_lock<mutex>& lk)
|
||||||
{
|
{
|
||||||
cond_.wait(lk, boost::bind(&sync_queue_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk)));
|
cond_.wait(lk, boost::bind(&sync_queue_base<ValueType, Queue>::not_empty_or_closed, this, boost::ref(lk)));
|
||||||
if (! empty(lk)) return false; // success
|
if (! empty(lk)) return false; // success
|
||||||
return true; // closed
|
return true; // closed
|
||||||
}
|
}
|
||||||
@@ -196,7 +197,7 @@ namespace detail
|
|||||||
template <class WClock, class Duration>
|
template <class WClock, class Duration>
|
||||||
queue_op_status sync_queue_base<ValueType, Queue>::wait_until_not_empty_or_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp)
|
queue_op_status sync_queue_base<ValueType, Queue>::wait_until_not_empty_or_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp)
|
||||||
{
|
{
|
||||||
if (! cond_.wait_until(lk, tp, boost::bind(&sync_queue_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk))))
|
if (! cond_.wait_until(lk, tp, boost::bind(&sync_queue_base<ValueType, Queue>::not_empty_or_closed, this, boost::ref(lk))))
|
||||||
return queue_op_status::timeout;
|
return queue_op_status::timeout;
|
||||||
if (! empty(lk)) return queue_op_status::success;
|
if (! empty(lk)) return queue_op_status::success;
|
||||||
return queue_op_status::closed;
|
return queue_op_status::closed;
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <boost/core/ref.hpp>
|
#include <boost/core/ref.hpp>
|
||||||
#include <boost/cstdint.hpp>
|
#include <boost/cstdint.hpp>
|
||||||
#include <boost/bind/bind.hpp>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <boost/core/enable_if.hpp>
|
#include <boost/core/enable_if.hpp>
|
||||||
@@ -47,6 +46,8 @@
|
|||||||
|
|
||||||
#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
|
#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
#else
|
||||||
|
#include <boost/bind/bind.hpp>
|
||||||
#endif
|
#endif
|
||||||
#include <boost/config/abi_prefix.hpp>
|
#include <boost/config/abi_prefix.hpp>
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ BOOST_THREAD_INLINE_NAMESPACE(v2)
|
|||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
void handle_task_region_exceptions(exception_list& errors)
|
inline void handle_task_region_exceptions(exception_list& errors)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
throw;
|
throw;
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ namespace boost
|
|||||||
is_deferred_=false;
|
is_deferred_=false;
|
||||||
execute(lk);
|
execute(lk);
|
||||||
}
|
}
|
||||||
waiters.wait(lk, boost::bind(&shared_state_base::is_done, boost::ref(*this)));
|
waiters.wait(lk, boost::bind(&shared_state_base::is_done, this));
|
||||||
if(rethrow && exception)
|
if(rethrow && exception)
|
||||||
{
|
{
|
||||||
boost::rethrow_exception(exception);
|
boost::rethrow_exception(exception);
|
||||||
@@ -419,7 +419,7 @@ namespace boost
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
do_callback(lock);
|
do_callback(lock);
|
||||||
return waiters.timed_wait(lock, rel_time, boost::bind(&shared_state_base::is_done, boost::ref(*this)));
|
return waiters.timed_wait(lock, rel_time, boost::bind(&shared_state_base::is_done, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool timed_wait_until(boost::system_time const& target_time)
|
bool timed_wait_until(boost::system_time const& target_time)
|
||||||
@@ -429,7 +429,7 @@ namespace boost
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
do_callback(lock);
|
do_callback(lock);
|
||||||
return waiters.timed_wait(lock, target_time, boost::bind(&shared_state_base::is_done, boost::ref(*this)));
|
return waiters.timed_wait(lock, target_time, boost::bind(&shared_state_base::is_done, this));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef BOOST_THREAD_USES_CHRONO
|
#ifdef BOOST_THREAD_USES_CHRONO
|
||||||
@@ -442,7 +442,7 @@ namespace boost
|
|||||||
if (is_deferred_)
|
if (is_deferred_)
|
||||||
return future_status::deferred;
|
return future_status::deferred;
|
||||||
do_callback(lock);
|
do_callback(lock);
|
||||||
if(!waiters.wait_until(lock, abs_time, boost::bind(&shared_state_base::is_done, boost::ref(*this))))
|
if(!waiters.wait_until(lock, abs_time, boost::bind(&shared_state_base::is_done, this)))
|
||||||
{
|
{
|
||||||
return future_status::timeout;
|
return future_status::timeout;
|
||||||
}
|
}
|
||||||
@@ -939,7 +939,7 @@ namespace boost
|
|||||||
join();
|
join();
|
||||||
#elif defined BOOST_THREAD_ASYNC_FUTURE_WAITS
|
#elif defined BOOST_THREAD_ASYNC_FUTURE_WAITS
|
||||||
unique_lock<boost::mutex> lk(this->mutex);
|
unique_lock<boost::mutex> lk(this->mutex);
|
||||||
this->waiters.wait(lk, boost::bind(&shared_state_base::is_done, boost::ref(*this)));
|
this->waiters.wait(lk, boost::bind(&shared_state_base::is_done, this));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4649,32 +4649,34 @@ namespace detail
|
|||||||
shared_ptr<FutureExecutorContinuationSharedState> that_;
|
shared_ptr<FutureExecutorContinuationSharedState> that_;
|
||||||
|
|
||||||
#if ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
#if ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||||
BOOST_THREAD_COPYABLE_AND_MOVABLE(run_it)
|
BOOST_THREAD_COPYABLE_AND_MOVABLE(run_it)
|
||||||
run_it(run_it const& x) //BOOST_NOEXCEPT
|
run_it(run_it const& x) //BOOST_NOEXCEPT
|
||||||
: that_(x.that_)
|
: that_(x.that_)
|
||||||
{}
|
{}
|
||||||
run_it& operator=(BOOST_THREAD_COPY_ASSIGN_REF(run_it) x) //BOOST_NOEXCEPT
|
run_it& operator=(BOOST_THREAD_COPY_ASSIGN_REF(run_it) x) //BOOST_NOEXCEPT
|
||||||
{
|
{
|
||||||
if (this != &x) {
|
if (this != &x) {
|
||||||
that_=x.that_;
|
that_=x.that_;
|
||||||
}
|
|
||||||
return *this;
|
|
||||||
}
|
}
|
||||||
// move
|
return *this;
|
||||||
run_it(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT
|
}
|
||||||
: that_(x.that_)
|
// move
|
||||||
{
|
run_it(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT
|
||||||
x.that_.reset();
|
: that_(boost::move(x.that_))
|
||||||
}
|
{
|
||||||
run_it& operator=(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT {
|
}
|
||||||
if (this != &x) {
|
run_it& operator=(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT {
|
||||||
that_=x.that;
|
if (this != &x) {
|
||||||
x.that_.reset();
|
that_ = boost::move(x.that_);
|
||||||
}
|
|
||||||
return *this;
|
|
||||||
}
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
run_it(shared_ptr<FutureExecutorContinuationSharedState> that) : that_(boost::move(that))
|
||||||
|
{}
|
||||||
|
#else
|
||||||
|
run_it(shared_ptr<FutureExecutorContinuationSharedState> that) : that_(that)
|
||||||
|
{}
|
||||||
#endif
|
#endif
|
||||||
run_it(shared_ptr<FutureExecutorContinuationSharedState> that) : that_ (that) {}
|
|
||||||
|
|
||||||
void operator()()
|
void operator()()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,14 +19,17 @@
|
|||||||
#include <boost/thread/detail/delete.hpp>
|
#include <boost/thread/detail/delete.hpp>
|
||||||
#include <boost/core/no_exceptions_support.hpp>
|
#include <boost/core/no_exceptions_support.hpp>
|
||||||
|
|
||||||
#include <boost/bind/bind.hpp>
|
|
||||||
#include <boost/assert.hpp>
|
#include <boost/assert.hpp>
|
||||||
#include <boost/config/abi_prefix.hpp>
|
|
||||||
|
|
||||||
#include <boost/cstdint.hpp>
|
#include <boost/cstdint.hpp>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
|
|
||||||
|
#if !defined(BOOST_THREAD_PROVIDES_INVOKE) && !defined(BOOST_THREAD_PROVIDES_INVOKE_RET)
|
||||||
|
#include <boost/bind/bind.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/config/abi_prefix.hpp>
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,12 @@
|
|||||||
#include <boost/thread/detail/move.hpp>
|
#include <boost/thread/detail/move.hpp>
|
||||||
#include <boost/thread/detail/invoke.hpp>
|
#include <boost/thread/detail/invoke.hpp>
|
||||||
#include <boost/core/no_exceptions_support.hpp>
|
#include <boost/core/no_exceptions_support.hpp>
|
||||||
|
#include <boost/atomic/capabilities.hpp>
|
||||||
|
#include <boost/atomic/atomic.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_THREAD_PROVIDES_INVOKE) && !defined(BOOST_THREAD_PROVIDES_INVOKE_RET)
|
||||||
#include <boost/bind/bind.hpp>
|
#include <boost/bind/bind.hpp>
|
||||||
#include <boost/atomic.hpp>
|
#endif
|
||||||
|
|
||||||
#include <boost/config/abi_prefix.hpp>
|
#include <boost/config/abi_prefix.hpp>
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <boost/thread/detail/config.hpp>
|
#include <boost/thread/detail/config.hpp>
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
|
#include <boost/assert.hpp>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ namespace boost
|
|||||||
boost::this_thread::disable_interruption do_not_disturb;
|
boost::this_thread::disable_interruption do_not_disturb;
|
||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
shared_cond.wait(lk, boost::bind(&state_data::can_lock_shared, boost::ref(state)));
|
shared_cond.wait(lk, boost::bind(&state_data::can_lock_shared, &state));
|
||||||
state.lock_shared();
|
state.lock_shared();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ namespace boost
|
|||||||
boost::this_thread::disable_interruption do_not_disturb;
|
boost::this_thread::disable_interruption do_not_disturb;
|
||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
if(!shared_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock_shared, boost::ref(state))))
|
if(!shared_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock_shared, &state)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,7 @@ namespace boost
|
|||||||
boost::this_thread::disable_interruption do_not_disturb;
|
boost::this_thread::disable_interruption do_not_disturb;
|
||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
if(!shared_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock_shared, boost::ref(state))))
|
if(!shared_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock_shared, &state)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -230,7 +230,7 @@ namespace boost
|
|||||||
boost::this_thread::disable_interruption do_not_disturb;
|
boost::this_thread::disable_interruption do_not_disturb;
|
||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_shared, boost::ref(state))))
|
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_shared, &state)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -270,7 +270,7 @@ namespace boost
|
|||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
state.exclusive_waiting_blocked=true;
|
state.exclusive_waiting_blocked=true;
|
||||||
exclusive_cond.wait(lk, boost::bind(&state_data::can_lock, boost::ref(state)));
|
exclusive_cond.wait(lk, boost::bind(&state_data::can_lock, &state));
|
||||||
state.exclusive=true;
|
state.exclusive=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,7 +282,7 @@ namespace boost
|
|||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
state.exclusive_waiting_blocked=true;
|
state.exclusive_waiting_blocked=true;
|
||||||
if(!exclusive_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock, boost::ref(state))))
|
if(!exclusive_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock, &state)))
|
||||||
{
|
{
|
||||||
state.exclusive_waiting_blocked=false;
|
state.exclusive_waiting_blocked=false;
|
||||||
release_waiters();
|
release_waiters();
|
||||||
@@ -300,7 +300,7 @@ namespace boost
|
|||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
state.exclusive_waiting_blocked=true;
|
state.exclusive_waiting_blocked=true;
|
||||||
if(!exclusive_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock, boost::ref(state))))
|
if(!exclusive_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock, &state)))
|
||||||
{
|
{
|
||||||
state.exclusive_waiting_blocked=false;
|
state.exclusive_waiting_blocked=false;
|
||||||
release_waiters();
|
release_waiters();
|
||||||
@@ -324,7 +324,7 @@ namespace boost
|
|||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
state.exclusive_waiting_blocked=true;
|
state.exclusive_waiting_blocked=true;
|
||||||
if(!exclusive_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock, boost::ref(state))))
|
if(!exclusive_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock, &state)))
|
||||||
{
|
{
|
||||||
state.exclusive_waiting_blocked=false;
|
state.exclusive_waiting_blocked=false;
|
||||||
release_waiters();
|
release_waiters();
|
||||||
@@ -362,7 +362,7 @@ namespace boost
|
|||||||
boost::this_thread::disable_interruption do_not_disturb;
|
boost::this_thread::disable_interruption do_not_disturb;
|
||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
shared_cond.wait(lk, boost::bind(&state_data::can_lock_upgrade, boost::ref(state)));
|
shared_cond.wait(lk, boost::bind(&state_data::can_lock_upgrade, &state));
|
||||||
state.lock_shared();
|
state.lock_shared();
|
||||||
state.upgrade=true;
|
state.upgrade=true;
|
||||||
}
|
}
|
||||||
@@ -374,7 +374,7 @@ namespace boost
|
|||||||
boost::this_thread::disable_interruption do_not_disturb;
|
boost::this_thread::disable_interruption do_not_disturb;
|
||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
if(!shared_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock_upgrade, boost::ref(state))))
|
if(!shared_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock_upgrade, &state)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -390,7 +390,7 @@ namespace boost
|
|||||||
boost::this_thread::disable_interruption do_not_disturb;
|
boost::this_thread::disable_interruption do_not_disturb;
|
||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
if(!shared_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock_upgrade, boost::ref(state))))
|
if(!shared_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock_upgrade, &state)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -412,7 +412,7 @@ namespace boost
|
|||||||
boost::this_thread::disable_interruption do_not_disturb;
|
boost::this_thread::disable_interruption do_not_disturb;
|
||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_upgrade, boost::ref(state))))
|
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_upgrade, &state)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -457,7 +457,7 @@ namespace boost
|
|||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
state.assert_lock_upgraded();
|
state.assert_lock_upgraded();
|
||||||
state.unlock_shared();
|
state.unlock_shared();
|
||||||
upgrade_cond.wait(lk, boost::bind(&state_data::no_shared, boost::ref(state)));
|
upgrade_cond.wait(lk, boost::bind(&state_data::no_shared, &state));
|
||||||
state.upgrade=false;
|
state.upgrade=false;
|
||||||
state.exclusive=true;
|
state.exclusive=true;
|
||||||
state.assert_locked();
|
state.assert_locked();
|
||||||
@@ -511,7 +511,7 @@ namespace boost
|
|||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
state.assert_lock_upgraded();
|
state.assert_lock_upgraded();
|
||||||
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::one_shared, boost::ref(state))))
|
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::one_shared, &state)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -569,7 +569,7 @@ namespace boost
|
|||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
state.assert_lock_shared();
|
state.assert_lock_shared();
|
||||||
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::one_shared, boost::ref(state))))
|
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::one_shared, &state)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -623,7 +623,7 @@ namespace boost
|
|||||||
#endif
|
#endif
|
||||||
boost::unique_lock<boost::mutex> lk(state_change);
|
boost::unique_lock<boost::mutex> lk(state_change);
|
||||||
state.assert_lock_shared();
|
state.assert_lock_shared();
|
||||||
if(!exclusive_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_upgrade, boost::ref(state))))
|
if(!exclusive_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_upgrade, &state)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,9 +275,9 @@ namespace boost {
|
|||||||
inline void shared_mutex::lock()
|
inline void shared_mutex::lock()
|
||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
gate1_.wait(lk, boost::bind(&shared_mutex::no_writer, boost::ref(*this)));
|
gate1_.wait(lk, boost::bind(&shared_mutex::no_writer, this));
|
||||||
state_ |= write_entered_;
|
state_ |= write_entered_;
|
||||||
gate2_.wait(lk, boost::bind(&shared_mutex::no_readers, boost::ref(*this)));
|
gate2_.wait(lk, boost::bind(&shared_mutex::no_readers, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool shared_mutex::try_lock()
|
inline bool shared_mutex::try_lock()
|
||||||
@@ -298,13 +298,13 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
||||||
&shared_mutex::no_writer, boost::ref(*this))))
|
&shared_mutex::no_writer, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
state_ |= write_entered_;
|
state_ |= write_entered_;
|
||||||
if (!gate2_.wait_until(lk, abs_time, boost::bind(
|
if (!gate2_.wait_until(lk, abs_time, boost::bind(
|
||||||
&shared_mutex::no_readers, boost::ref(*this))))
|
&shared_mutex::no_readers, this)))
|
||||||
{
|
{
|
||||||
state_ &= ~write_entered_;
|
state_ &= ~write_entered_;
|
||||||
return false;
|
return false;
|
||||||
@@ -319,13 +319,13 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
||||||
&shared_mutex::no_writer, boost::ref(*this))))
|
&shared_mutex::no_writer, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
state_ |= write_entered_;
|
state_ |= write_entered_;
|
||||||
if (!gate2_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
if (!gate2_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
||||||
&shared_mutex::no_readers, boost::ref(*this))))
|
&shared_mutex::no_readers, this)))
|
||||||
{
|
{
|
||||||
state_ &= ~write_entered_;
|
state_ &= ~write_entered_;
|
||||||
return false;
|
return false;
|
||||||
@@ -350,7 +350,7 @@ namespace boost {
|
|||||||
inline void shared_mutex::lock_shared()
|
inline void shared_mutex::lock_shared()
|
||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
gate1_.wait(lk, boost::bind(&shared_mutex::no_writer_no_max_readers, boost::ref(*this)));
|
gate1_.wait(lk, boost::bind(&shared_mutex::no_writer_no_max_readers, this));
|
||||||
count_t num_readers = (state_ & n_readers_) + 1;
|
count_t num_readers = (state_ & n_readers_) + 1;
|
||||||
state_ &= ~n_readers_;
|
state_ &= ~n_readers_;
|
||||||
state_ |= num_readers;
|
state_ |= num_readers;
|
||||||
@@ -376,7 +376,7 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
||||||
&shared_mutex::no_writer_no_max_readers, boost::ref(*this))))
|
&shared_mutex::no_writer_no_max_readers, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -393,7 +393,7 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
||||||
&shared_mutex::no_writer_no_max_readers, boost::ref(*this))))
|
&shared_mutex::no_writer_no_max_readers, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -653,9 +653,9 @@ namespace boost {
|
|||||||
inline void upgrade_mutex::lock()
|
inline void upgrade_mutex::lock()
|
||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this)));
|
gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_upgrader, this));
|
||||||
state_ |= write_entered_;
|
state_ |= write_entered_;
|
||||||
gate2_.wait(lk, boost::bind(&upgrade_mutex::no_readers, boost::ref(*this)));
|
gate2_.wait(lk, boost::bind(&upgrade_mutex::no_readers, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool upgrade_mutex::try_lock()
|
inline bool upgrade_mutex::try_lock()
|
||||||
@@ -676,13 +676,13 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
||||||
&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this))))
|
&upgrade_mutex::no_writer_no_upgrader, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
state_ |= write_entered_;
|
state_ |= write_entered_;
|
||||||
if (!gate2_.wait_until(lk, abs_time, boost::bind(
|
if (!gate2_.wait_until(lk, abs_time, boost::bind(
|
||||||
&upgrade_mutex::no_readers, boost::ref(*this))))
|
&upgrade_mutex::no_readers, this)))
|
||||||
{
|
{
|
||||||
state_ &= ~write_entered_;
|
state_ &= ~write_entered_;
|
||||||
return false;
|
return false;
|
||||||
@@ -697,13 +697,13 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
||||||
&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this))))
|
&upgrade_mutex::no_writer_no_upgrader, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
state_ |= write_entered_;
|
state_ |= write_entered_;
|
||||||
if (!gate2_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
if (!gate2_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
||||||
&upgrade_mutex::no_readers, boost::ref(*this))))
|
&upgrade_mutex::no_readers, this)))
|
||||||
{
|
{
|
||||||
state_ &= ~write_entered_;
|
state_ &= ~write_entered_;
|
||||||
return false;
|
return false;
|
||||||
@@ -729,7 +729,7 @@ namespace boost {
|
|||||||
inline void upgrade_mutex::lock_shared()
|
inline void upgrade_mutex::lock_shared()
|
||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_max_readers, boost::ref(*this)));
|
gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_max_readers, this));
|
||||||
count_t num_readers = (state_ & n_readers_) + 1;
|
count_t num_readers = (state_ & n_readers_) + 1;
|
||||||
state_ &= ~n_readers_;
|
state_ &= ~n_readers_;
|
||||||
state_ |= num_readers;
|
state_ |= num_readers;
|
||||||
@@ -755,7 +755,7 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
||||||
&upgrade_mutex::no_writer_no_max_readers, boost::ref(*this))))
|
&upgrade_mutex::no_writer_no_max_readers, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -772,7 +772,7 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
||||||
&upgrade_mutex::no_writer_no_max_readers, boost::ref(*this))))
|
&upgrade_mutex::no_writer_no_max_readers, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -807,7 +807,7 @@ namespace boost {
|
|||||||
inline void upgrade_mutex::lock_upgrade()
|
inline void upgrade_mutex::lock_upgrade()
|
||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_upgrader_no_max_readers, boost::ref(*this)));
|
gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_upgrader_no_max_readers, this));
|
||||||
count_t num_readers = (state_ & n_readers_) + 1;
|
count_t num_readers = (state_ & n_readers_) + 1;
|
||||||
state_ &= ~n_readers_;
|
state_ &= ~n_readers_;
|
||||||
state_ |= upgradable_entered_ | num_readers;
|
state_ |= upgradable_entered_ | num_readers;
|
||||||
@@ -833,7 +833,7 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
||||||
&upgrade_mutex::no_writer_no_upgrader_no_max_readers, boost::ref(*this))))
|
&upgrade_mutex::no_writer_no_upgrader_no_max_readers, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -850,7 +850,7 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
|
||||||
&upgrade_mutex::no_writer_no_upgrader_no_max_readers, boost::ref(*this))))
|
&upgrade_mutex::no_writer_no_upgrader_no_max_readers, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -898,7 +898,7 @@ namespace boost {
|
|||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
BOOST_ASSERT(one_or_more_readers());
|
BOOST_ASSERT(one_or_more_readers());
|
||||||
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
||||||
&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this))))
|
&upgrade_mutex::no_writer_no_upgrader, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -906,7 +906,7 @@ namespace boost {
|
|||||||
state_ &= ~n_readers_;
|
state_ &= ~n_readers_;
|
||||||
state_ |= (write_entered_ | num_readers);
|
state_ |= (write_entered_ | num_readers);
|
||||||
if (!gate2_.wait_until(lk, abs_time, boost::bind(
|
if (!gate2_.wait_until(lk, abs_time, boost::bind(
|
||||||
&upgrade_mutex::no_readers, boost::ref(*this))))
|
&upgrade_mutex::no_readers, this)))
|
||||||
{
|
{
|
||||||
++num_readers;
|
++num_readers;
|
||||||
state_ &= ~(write_entered_ | n_readers_);
|
state_ &= ~(write_entered_ | n_readers_);
|
||||||
@@ -953,7 +953,7 @@ namespace boost {
|
|||||||
boost::unique_lock<mutex_t> lk(mut_);
|
boost::unique_lock<mutex_t> lk(mut_);
|
||||||
BOOST_ASSERT(one_or_more_readers());
|
BOOST_ASSERT(one_or_more_readers());
|
||||||
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
if (!gate1_.wait_until(lk, abs_time, boost::bind(
|
||||||
&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this))))
|
&upgrade_mutex::no_writer_no_upgrader, this)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -987,7 +987,7 @@ namespace boost {
|
|||||||
count_t num_readers = (state_ & n_readers_) - 1;
|
count_t num_readers = (state_ & n_readers_) - 1;
|
||||||
state_ &= ~(upgradable_entered_ | n_readers_);
|
state_ &= ~(upgradable_entered_ | n_readers_);
|
||||||
state_ |= write_entered_ | num_readers;
|
state_ |= write_entered_ | num_readers;
|
||||||
gate2_.wait(lk, boost::bind(&upgrade_mutex::no_readers, boost::ref(*this)));
|
gate2_.wait(lk, boost::bind(&upgrade_mutex::no_readers, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool upgrade_mutex::try_unlock_upgrade_and_lock()
|
inline bool upgrade_mutex::try_unlock_upgrade_and_lock()
|
||||||
@@ -1017,7 +1017,7 @@ namespace boost {
|
|||||||
state_ &= ~(upgradable_entered_ | n_readers_);
|
state_ &= ~(upgradable_entered_ | n_readers_);
|
||||||
state_ |= (write_entered_ | num_readers);
|
state_ |= (write_entered_ | num_readers);
|
||||||
if (!gate2_.wait_until(lk, abs_time, boost::bind(
|
if (!gate2_.wait_until(lk, abs_time, boost::bind(
|
||||||
&upgrade_mutex::no_readers, boost::ref(*this))))
|
&upgrade_mutex::no_readers, this)))
|
||||||
{
|
{
|
||||||
++num_readers;
|
++num_readers;
|
||||||
state_ &= ~(write_entered_ | n_readers_);
|
state_ &= ~(write_entered_ | n_readers_);
|
||||||
|
|||||||
@@ -22,7 +22,9 @@
|
|||||||
#include <boost/thread/detail/move.hpp>
|
#include <boost/thread/detail/move.hpp>
|
||||||
#include <boost/thread/detail/invoke.hpp>
|
#include <boost/thread/detail/invoke.hpp>
|
||||||
|
|
||||||
|
#if !defined(BOOST_THREAD_PROVIDES_INVOKE) && !defined(BOOST_THREAD_PROVIDES_INVOKE_RET)
|
||||||
#include <boost/bind/bind.hpp>
|
#include <boost/bind/bind.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <boost/config/abi_prefix.hpp>
|
#include <boost/config/abi_prefix.hpp>
|
||||||
|
|
||||||
@@ -152,7 +154,7 @@ namespace boost
|
|||||||
{
|
{
|
||||||
name_once_mutex(mutex_name,flag_address);
|
name_once_mutex(mutex_name,flag_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ::boost::detail::win32::create_event(
|
return ::boost::detail::win32::create_event(
|
||||||
mutex_name,
|
mutex_name,
|
||||||
::boost::detail::win32::manual_reset_event,
|
::boost::detail::win32::manual_reset_event,
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
|
#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
|
||||||
#include <boost/assert.hpp>
|
#include <boost/assert.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
#include <boost/atomic.hpp>
|
|
||||||
#include <boost/memory_order.hpp>
|
#include <boost/memory_order.hpp>
|
||||||
|
#include <boost/atomic/atomic.hpp>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
|
|||||||
@@ -34,10 +34,10 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <Activation.h>
|
#include <Activation.h>
|
||||||
#include <wrl\client.h>
|
#include <wrl/client.h>
|
||||||
#include <wrl\event.h>
|
#include <wrl/event.h>
|
||||||
#include <wrl\wrappers\corewrappers.h>
|
#include <wrl/wrappers/corewrappers.h>
|
||||||
#include <wrl\ftm.h>
|
#include <wrl/ftm.h>
|
||||||
#include <windows.system.threading.h>
|
#include <windows.system.threading.h>
|
||||||
#pragma comment(lib, "runtimeobject.lib")
|
#pragma comment(lib, "runtimeobject.lib")
|
||||||
#endif
|
#endif
|
||||||
@@ -577,10 +577,18 @@ namespace boost
|
|||||||
} Reason;
|
} Reason;
|
||||||
} REASON_CONTEXT, *PREASON_CONTEXT;
|
} REASON_CONTEXT, *PREASON_CONTEXT;
|
||||||
typedef BOOL (WINAPI *setwaitabletimerex_t)(HANDLE, const LARGE_INTEGER *, LONG, PTIMERAPCROUTINE, LPVOID, PREASON_CONTEXT, ULONG);
|
typedef BOOL (WINAPI *setwaitabletimerex_t)(HANDLE, const LARGE_INTEGER *, LONG, PTIMERAPCROUTINE, LPVOID, PREASON_CONTEXT, ULONG);
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable: 4100) // unreferenced formal parameter
|
||||||
|
#endif
|
||||||
static inline BOOL WINAPI SetWaitableTimerEx_emulation(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay)
|
static inline BOOL WINAPI SetWaitableTimerEx_emulation(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay)
|
||||||
{
|
{
|
||||||
return SetWaitableTimer(hTimer, lpDueTime, lPeriod, pfnCompletionRoutine, lpArgToCompletionRoutine, FALSE);
|
return SetWaitableTimer(hTimer, lpDueTime, lPeriod, pfnCompletionRoutine, lpArgToCompletionRoutine, FALSE);
|
||||||
}
|
}
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable: 6387) // MSVC sanitiser warns that GetModuleHandleA() might fail
|
#pragma warning(disable: 6387) // MSVC sanitiser warns that GetModuleHandleA() might fail
|
||||||
|
|||||||
@@ -268,16 +268,15 @@ rule generate_self_contained_header_tests
|
|||||||
|
|
||||||
if ! [ os.environ BOOST_THREAD_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ]
|
if ! [ os.environ BOOST_THREAD_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ]
|
||||||
{
|
{
|
||||||
local headers_path = [ path.make $(BOOST_ROOT)/libs/thread/include/boost/thread ] ;
|
for file in [ glob-tree-ex ../include/boost/thread : *.hpp : detail pthread win32 ]
|
||||||
for file in [ path.glob-tree $(headers_path) : *.hpp : detail pthread win32 ]
|
|
||||||
{
|
{
|
||||||
local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
|
local rel_file = [ path.relative-to ../include/boost/thread $(file) ] ;
|
||||||
# Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
|
# Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
|
||||||
# All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
|
# All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
|
||||||
local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ;
|
local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ;
|
||||||
#ECHO $(rel_file) ;
|
#ECHO $(rel_file) ;
|
||||||
all_rules += [ compile self_contained_header.cpp : <define>"BOOST_THREAD_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(test_name) ] ;
|
all_rules += [ compile self_contained_header.cpp : <define>"BOOST_THREAD_TEST_HEADER=$(rel_file)" <dependency>$(file) <use>../build//boost_thread : $(test_name) ] ;
|
||||||
all_rules += [ compile self_contained_header.cpp : <define>"BOOST_THREAD_TEST_HEADER=$(rel_file)" <define>"BOOST_THREAD_TEST_POST_WINDOWS_H" <dependency>$(file) <conditional>@windows-cygwin-specific : $(test_name)-post_winh ] ;
|
all_rules += [ compile self_contained_header.cpp : <define>"BOOST_THREAD_TEST_HEADER=$(rel_file)" <define>"BOOST_THREAD_TEST_POST_WINDOWS_H" <dependency>$(file) <conditional>@windows-cygwin-specific <use>../build//boost_thread : $(test_name)-post_winh ] ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1012,7 +1011,7 @@ rule generate_self_contained_header_tests
|
|||||||
#[ thread-run test_10128.cpp ]
|
#[ thread-run test_10128.cpp ]
|
||||||
#[ thread-run test_10340.cpp ]
|
#[ thread-run test_10340.cpp ]
|
||||||
;
|
;
|
||||||
|
|
||||||
explicit ts_more_cpp11 ;
|
explicit ts_more_cpp11 ;
|
||||||
test-suite ts_more_cpp11
|
test-suite ts_more_cpp11
|
||||||
:
|
:
|
||||||
@@ -1033,13 +1032,13 @@ rule generate_self_contained_header_tests
|
|||||||
:
|
:
|
||||||
[ thread-run2-noit ./experimental/parallel/v1/exception_list_pass.cpp : exception_list_p ]
|
[ thread-run2-noit ./experimental/parallel/v1/exception_list_pass.cpp : exception_list_p ]
|
||||||
;
|
;
|
||||||
|
|
||||||
#explicit ts_task_region ;
|
#explicit ts_task_region ;
|
||||||
test-suite ts_task_region
|
test-suite ts_task_region
|
||||||
:
|
:
|
||||||
[ thread-run2-noit ./experimental/parallel/v2/task_region_pass.cpp : task_region_p ]
|
[ thread-run2-noit ./experimental/parallel/v2/task_region_pass.cpp : task_region_p ]
|
||||||
;
|
;
|
||||||
|
|
||||||
explicit ts_other ;
|
explicit ts_other ;
|
||||||
test-suite ts_other
|
test-suite ts_other
|
||||||
:
|
:
|
||||||
@@ -1050,7 +1049,7 @@ rule generate_self_contained_header_tests
|
|||||||
explicit ts_ ;
|
explicit ts_ ;
|
||||||
test-suite ts_
|
test-suite ts_
|
||||||
:
|
:
|
||||||
#[ thread-run test_11256.cpp ]
|
#[ thread-run test_11256.cpp ]
|
||||||
#[ thread-run test_11256.cpp ]
|
#[ thread-run test_11256.cpp ]
|
||||||
#[ thread-run test_11499.cpp ]
|
#[ thread-run test_11499.cpp ]
|
||||||
#[ thread-run test_11611.cpp ]
|
#[ thread-run test_11611.cpp ]
|
||||||
@@ -1060,7 +1059,7 @@ rule generate_self_contained_header_tests
|
|||||||
#[ thread-run test_12949.cpp ]
|
#[ thread-run test_12949.cpp ]
|
||||||
#[ thread-run test_13480b.cpp ]
|
#[ thread-run test_13480b.cpp ]
|
||||||
[ thread-run test_13561.cpp ]
|
[ thread-run test_13561.cpp ]
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
explicit test_time_jumps_1_obj ;
|
explicit test_time_jumps_1_obj ;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include <boost/thread/experimental/parallel/v1/exception_list.hpp>
|
#include <boost/thread/experimental/parallel/v1/exception_list.hpp>
|
||||||
|
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include <boost/thread/experimental/parallel/v2/task_region.hpp>
|
#include <boost/thread/experimental/parallel/v2/task_region.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if ! defined BOOST_NO_CXX11_LAMBDAS && defined(BOOST_THREAD_PROVIDES_INVOKE)
|
#if ! defined BOOST_NO_CXX11_LAMBDAS && defined(BOOST_THREAD_PROVIDES_INVOKE)
|
||||||
using boost::experimental::parallel::v2::task_region;
|
using boost::experimental::parallel::v2::task_region;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
// <boost/thread/detail/invoke.hpp>
|
// <boost/thread/detail/invoke.hpp>
|
||||||
|
|
||||||
#include <boost/thread/detail/invoke.hpp>
|
#include <boost/thread/detail/invoke.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int f()
|
int f()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
// <boost/thread/detail/invoke.hpp>
|
// <boost/thread/detail/invoke.hpp>
|
||||||
|
|
||||||
#include <boost/thread/detail/invoke.hpp>
|
#include <boost/thread/detail/invoke.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
// <boost/thread/detail/invoke.hpp>
|
// <boost/thread/detail/invoke.hpp>
|
||||||
|
|
||||||
#include <boost/thread/detail/invoke.hpp>
|
#include <boost/thread/detail/invoke.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
// <boost/thread/detail/invoker.hpp>
|
// <boost/thread/detail/invoker.hpp>
|
||||||
|
|
||||||
#include <boost/thread/detail/invoker.hpp>
|
#include <boost/thread/detail/invoker.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int f()
|
int f()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
// <boost/thread/detail/invoker.hpp>
|
// <boost/thread/detail/invoker.hpp>
|
||||||
|
|
||||||
#include <boost/thread/detail/invoker.hpp>
|
#include <boost/thread/detail/invoker.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/detail/invoker.hpp>
|
#include <boost/thread/detail/invoker.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
// condition_variable(const condition_variable&) = delete;
|
// condition_variable(const condition_variable&) = delete;
|
||||||
|
|
||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
void fail()
|
void fail()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
// condition_variable(const condition_variable&) = delete;
|
// condition_variable(const condition_variable&) = delete;
|
||||||
|
|
||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/thread/locks.hpp>
|
#include <boost/thread/locks.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
boost::condition_variable* cv;
|
boost::condition_variable* cv;
|
||||||
boost::mutex m;
|
boost::mutex m;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// Summary of each test:
|
// Summary of each test:
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
|
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/type_traits/is_same.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include "../../../timming.hpp"
|
#include "../../../timming.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "../../../timming.hpp"
|
#include "../../../timming.hpp"
|
||||||
@@ -64,9 +65,9 @@ void f()
|
|||||||
assert(test2 == 0);
|
assert(test2 == 0);
|
||||||
test1 = 1;
|
test1 = 1;
|
||||||
cv.notify_one();
|
cv.notify_one();
|
||||||
Clock::time_point t0 = Clock::now();
|
BOOST_ATTRIBUTE_UNUSED Clock::time_point t0 = Clock::now();
|
||||||
cv.wait_for(lk, milliseconds(250), Pred(test2));
|
cv.wait_for(lk, milliseconds(250), Pred(test2));
|
||||||
Clock::time_point t1 = Clock::now();
|
BOOST_ATTRIBUTE_UNUSED Clock::time_point t1 = Clock::now();
|
||||||
if (runs == 0)
|
if (runs == 0)
|
||||||
{
|
{
|
||||||
assert(t1 - t0 < max_diff);
|
assert(t1 - t0 < max_diff);
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include "../../../timming.hpp"
|
#include "../../../timming.hpp"
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "../../../timming.hpp"
|
#include "../../../timming.hpp"
|
||||||
@@ -79,7 +80,7 @@ void f()
|
|||||||
cv.notify_one();
|
cv.notify_one();
|
||||||
Clock::time_point t0 = Clock::now();
|
Clock::time_point t0 = Clock::now();
|
||||||
Clock::time_point t = t0 + Clock::duration(250);
|
Clock::time_point t = t0 + Clock::duration(250);
|
||||||
bool r = cv.wait_until(lk, t, Pred(test2));
|
BOOST_ATTRIBUTE_UNUSED bool r = cv.wait_until(lk, t, Pred(test2));
|
||||||
Clock::time_point t1 = Clock::now();
|
Clock::time_point t1 = Clock::now();
|
||||||
if (runs == 0)
|
if (runs == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
// condition_variable_any(const condition_variable_any&) = delete;
|
// condition_variable_any(const condition_variable_any&) = delete;
|
||||||
|
|
||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
void fail()
|
void fail()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
// condition_variable_any(const condition_variable_any&) = delete;
|
// condition_variable_any(const condition_variable_any&) = delete;
|
||||||
|
|
||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/thread/locks.hpp>
|
#include <boost/thread/locks.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
boost::condition_variable_any* cv;
|
boost::condition_variable_any* cv;
|
||||||
boost::timed_mutex m;
|
boost::timed_mutex m;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// Summary of each test:
|
// Summary of each test:
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include "../../../timming.hpp"
|
#include "../../../timming.hpp"
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO
|
#if defined BOOST_THREAD_USES_CHRONO
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include "../../../timming.hpp"
|
#include "../../../timming.hpp"
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO
|
#if defined BOOST_THREAD_USES_CHRONO
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include "../../../timming.hpp"
|
#include "../../../timming.hpp"
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO
|
#if defined BOOST_THREAD_USES_CHRONO
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include "../../../timming.hpp"
|
#include "../../../timming.hpp"
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO
|
#if defined BOOST_THREAD_USES_CHRONO
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
// static unsigned hardware_concurrency();
|
// static unsigned hardware_concurrency();
|
||||||
|
|
||||||
#include <boost/thread/condition_variable.hpp>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include <boost/thread/locks.hpp>
|
#include <boost/thread/locks.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/chrono/chrono.hpp>
|
#include <boost/chrono/chrono.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
boost::condition_variable cv;
|
boost::condition_variable cv;
|
||||||
boost::mutex mut;
|
boost::mutex mut;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include <boost/thread/detail/memory.hpp>
|
#include <boost/thread/detail/memory.hpp>
|
||||||
#include <boost/thread/csbl/memory/unique_ptr.hpp>
|
#include <boost/thread/csbl/memory/unique_ptr.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/thread/executors/basic_thread_pool.hpp>
|
#include <boost/thread/executors/basic_thread_pool.hpp>
|
||||||
#include <boost/thread/executor.hpp>
|
#include <boost/thread/executor.hpp>
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include <boost/thread/detail/memory.hpp>
|
#include <boost/thread/detail/memory.hpp>
|
||||||
#include <boost/thread/csbl/memory/unique_ptr.hpp>
|
#include <boost/thread/csbl/memory/unique_ptr.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
typedef boost::chrono::high_resolution_clock Clock;
|
typedef boost::chrono::high_resolution_clock Clock;
|
||||||
typedef boost::chrono::milliseconds ms;
|
typedef boost::chrono::milliseconds ms;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include <boost/thread/detail/log.hpp>
|
#include <boost/thread/detail/log.hpp>
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
|
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <boost/exception/exception.hpp>
|
#include <boost/exception/exception.hpp>
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
||||||
#include "../test_allocator.hpp"
|
#include "../test_allocator.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/core/ref.hpp>
|
#include <boost/core/ref.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO
|
#if defined BOOST_THREAD_USES_CHRONO
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO
|
#if defined BOOST_THREAD_USES_CHRONO
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
boost::mutex m0;
|
boost::mutex m0;
|
||||||
boost::mutex m1;
|
boost::mutex m1;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
boost::mutex m;
|
boost::mutex m;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include <boost/thread/detail/log.hpp>
|
#include <boost/thread/detail/log.hpp>
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
|
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/thread/executors/basic_thread_pool.hpp>
|
#include <boost/thread/executors/basic_thread_pool.hpp>
|
||||||
#include <boost/thread/executor.hpp>
|
#include <boost/thread/executor.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
|
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include <boost/thread/detail/log.hpp>
|
#include <boost/thread/detail/log.hpp>
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
|
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/chrono/chrono_io.hpp>
|
#include <boost/chrono/chrono_io.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO
|
#if defined BOOST_THREAD_USES_CHRONO
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/chrono/chrono_io.hpp>
|
#include <boost/chrono/chrono_io.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO
|
#if defined BOOST_THREAD_USES_CHRONO
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/chrono/chrono_io.hpp>
|
#include <boost/chrono/chrono_io.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include "../../../timming.hpp"
|
#include "../../../timming.hpp"
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO
|
#if defined BOOST_THREAD_USES_CHRONO
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
|
||||||
struct A
|
struct A
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include <boost/thread/detail/config.hpp>
|
#include <boost/thread/detail/config.hpp>
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
|
||||||
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
class A
|
class A
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
class A
|
class A
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if BOOST_THREAD_VERSION == 4
|
#if BOOST_THREAD_VERSION == 4
|
||||||
#define BOOST_THREAD_DETAIL_SIGNATURE double()
|
#define BOOST_THREAD_DETAIL_SIGNATURE double()
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 4
|
#define BOOST_THREAD_VERSION 4
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if BOOST_THREAD_VERSION == 4
|
#if BOOST_THREAD_VERSION == 4
|
||||||
#define BOOST_THREAD_DETAIL_SIGNATURE double()
|
#define BOOST_THREAD_DETAIL_SIGNATURE double()
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
class A
|
class A
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 4
|
#define BOOST_THREAD_VERSION 4
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO && \
|
#if defined BOOST_THREAD_USES_CHRONO && \
|
||||||
defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && \
|
defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && \
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
class A
|
class A
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
class A
|
class A
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
class A
|
class A
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
class A
|
class A
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 4
|
#define BOOST_THREAD_VERSION 4
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_USES_CHRONO
|
#if defined BOOST_THREAD_USES_CHRONO
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
class A
|
class A
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/type_traits/is_same.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
struct A {};
|
struct A {};
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
|
||||||
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
||||||
#include "../test_allocator.hpp"
|
#include "../test_allocator.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
|
||||||
struct A
|
struct A
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
||||||
#include "../test_allocator.hpp"
|
#include "../test_allocator.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
|
||||||
#include "../test_allocator.hpp"
|
#include "../test_allocator.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 4
|
#define BOOST_THREAD_VERSION 4
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 4
|
#define BOOST_THREAD_VERSION 4
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/thread/detail/memory.hpp>
|
#include <boost/thread/detail/memory.hpp>
|
||||||
#include <boost/thread/csbl/memory/unique_ptr.hpp>
|
#include <boost/thread/csbl/memory/unique_ptr.hpp>
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define BOOST_THREAD_VERSION 3
|
#define BOOST_THREAD_VERSION 3
|
||||||
|
|
||||||
#include <boost/thread/future.hpp>
|
#include <boost/thread/future.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
|
||||||
struct A
|
struct A
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user