aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugaevskiy <bugaevskiy@yandex-team.com>2022-08-26 16:38:30 +0300
committerbugaevskiy <bugaevskiy@yandex-team.com>2022-08-26 16:38:30 +0300
commit505ddf87680103d2ee908d9eb05907c7d81b8484 (patch)
tree74ae5f11bee68a91e066167e838a401e4d387cac
parentb1cbfc243abcf8461ad3660a5cb70f70706e3fb0 (diff)
downloadydb-505ddf87680103d2ee908d9eb05907c7d81b8484.tar.gz
Reimport boost/thread as a separate library
-rw-r--r--CMakeLists.darwin.txt4
-rw-r--r--CMakeLists.linux.txt4
-rw-r--r--contrib/restricted/boost/boost/thread/caller_context.hpp59
-rw-r--r--contrib/restricted/boost/boost/thread/completion_latch.hpp225
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/deque_adaptor.hpp209
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/deque_base.hpp202
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/deque_views.hpp165
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/detail/sync_deque_base.hpp223
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/detail/sync_queue_base.hpp223
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/queue_adaptor.hpp209
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/queue_base.hpp202
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/queue_op_status.hpp46
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/queue_views.hpp144
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/sync_bounded_queue.hpp727
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/sync_deque.hpp325
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/sync_priority_queue.hpp369
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/sync_queue.hpp325
-rw-r--r--contrib/restricted/boost/boost/thread/concurrent_queues/sync_timed_queue.hpp403
-rw-r--r--contrib/restricted/boost/boost/thread/condition.hpp21
-rw-r--r--contrib/restricted/boost/boost/thread/csbl/deque.hpp45
-rw-r--r--contrib/restricted/boost/boost/thread/csbl/devector.hpp102
-rw-r--r--contrib/restricted/boost/boost/thread/csbl/list.hpp35
-rw-r--r--contrib/restricted/boost/boost/thread/csbl/memory.hpp61
-rw-r--r--contrib/restricted/boost/boost/thread/csbl/memory/default_delete.hpp41
-rw-r--r--contrib/restricted/boost/boost/thread/csbl/queue.hpp45
-rw-r--r--contrib/restricted/boost/boost/thread/detail/counter.hpp106
-rw-r--r--contrib/restricted/boost/boost/thread/detail/force_cast.hpp39
-rw-r--r--contrib/restricted/boost/boost/thread/detail/function_wrapper.hpp93
-rw-r--r--contrib/restricted/boost/boost/thread/detail/log.hpp98
-rw-r--r--contrib/restricted/boost/boost/thread/detail/singleton.hpp59
-rw-r--r--contrib/restricted/boost/boost/thread/detail/tss_hooks.hpp65
-rw-r--r--contrib/restricted/boost/boost/thread/executors/basic_thread_pool.hpp326
-rw-r--r--contrib/restricted/boost/boost/thread/executors/detail/priority_executor_base.hpp83
-rw-r--r--contrib/restricted/boost/boost/thread/executors/detail/scheduled_executor_base.hpp66
-rw-r--r--contrib/restricted/boost/boost/thread/executors/inline_executor.hpp171
-rw-r--r--contrib/restricted/boost/boost/thread/executors/loop_executor.hpp209
-rw-r--r--contrib/restricted/boost/boost/thread/executors/scheduled_thread_pool.hpp49
-rw-r--r--contrib/restricted/boost/boost/thread/executors/scheduler.hpp281
-rw-r--r--contrib/restricted/boost/boost/thread/executors/scheduling_adaptor.hpp62
-rw-r--r--contrib/restricted/boost/boost/thread/executors/serial_executor.hpp225
-rw-r--r--contrib/restricted/boost/boost/thread/executors/serial_executor_cont.hpp170
-rw-r--r--contrib/restricted/boost/boost/thread/executors/thread_executor.hpp157
-rw-r--r--contrib/restricted/boost/boost/thread/experimental/config/inline_namespace.hpp23
-rw-r--r--contrib/restricted/boost/boost/thread/experimental/exception_list.hpp16
-rw-r--r--contrib/restricted/boost/boost/thread/experimental/parallel/v1/exception_list.hpp70
-rw-r--r--contrib/restricted/boost/boost/thread/experimental/parallel/v1/inline_namespace.hpp28
-rw-r--r--contrib/restricted/boost/boost/thread/experimental/parallel/v2/inline_namespace.hpp29
-rw-r--r--contrib/restricted/boost/boost/thread/experimental/parallel/v2/task_region.hpp316
-rw-r--r--contrib/restricted/boost/boost/thread/experimental/task_region.hpp16
-rw-r--r--contrib/restricted/boost/boost/thread/externally_locked.hpp351
-rw-r--r--contrib/restricted/boost/boost/thread/externally_locked_stream.hpp170
-rw-r--r--contrib/restricted/boost/boost/thread/latch.hpp170
-rw-r--r--contrib/restricted/boost/boost/thread/lock_concepts.hpp197
-rw-r--r--contrib/restricted/boost/boost/thread/lock_factories.hpp78
-rw-r--r--contrib/restricted/boost/boost/thread/lock_traits.hpp45
-rw-r--r--contrib/restricted/boost/boost/thread/lockable_adapter.hpp226
-rw-r--r--contrib/restricted/boost/boost/thread/lockable_concepts.hpp157
-rw-r--r--contrib/restricted/boost/boost/thread/null_mutex.hpp243
-rw-r--r--contrib/restricted/boost/boost/thread/ostream_buffer.hpp45
-rw-r--r--contrib/restricted/boost/boost/thread/poly_lockable.hpp68
-rw-r--r--contrib/restricted/boost/boost/thread/poly_lockable_adapter.hpp89
-rw-r--r--contrib/restricted/boost/boost/thread/poly_shared_lockable.hpp135
-rw-r--r--contrib/restricted/boost/boost/thread/poly_shared_lockable_adapter.hpp170
-rw-r--r--contrib/restricted/boost/boost/thread/reverse_lock.hpp59
-rw-r--r--contrib/restricted/boost/boost/thread/scoped_thread.hpp294
-rw-r--r--contrib/restricted/boost/boost/thread/strict_lock.hpp235
-rw-r--r--contrib/restricted/boost/boost/thread/sync_bounded_queue.hpp16
-rw-r--r--contrib/restricted/boost/boost/thread/sync_queue.hpp16
-rw-r--r--contrib/restricted/boost/boost/thread/synchronized_value.hpp1068
-rw-r--r--contrib/restricted/boost/boost/thread/testable_mutex.hpp152
-rw-r--r--contrib/restricted/boost/boost/thread/thread_functors.hpp72
-rw-r--r--contrib/restricted/boost/boost/thread/thread_guard.hpp46
-rw-r--r--contrib/restricted/boost/boost/thread/thread_pool.hpp15
-rw-r--r--contrib/restricted/boost/boost/thread/user_scheduler.hpp202
-rw-r--r--contrib/restricted/boost/boost/thread/win32/mfc_thread_init.hpp40
-rw-r--r--contrib/restricted/boost/boost/thread/with_lock_guard.hpp234
-rw-r--r--contrib/restricted/boost/libs/graph/CMakeLists.txt2
-rw-r--r--contrib/restricted/boost/libs/thread/CMakeLists.darwin.txt47
-rw-r--r--contrib/restricted/boost/libs/thread/CMakeLists.linux.txt46
-rw-r--r--contrib/restricted/boost/libs/thread/CMakeLists.txt13
-rw-r--r--contrib/restricted/boost/system/include/boost/system/detail/std_category.hpp2
-rw-r--r--contrib/restricted/boost/thread/CMakeLists.txt58
-rw-r--r--contrib/restricted/boost/thread/README.md10
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread.hpp (renamed from contrib/restricted/boost/boost/thread.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/barrier.hpp (renamed from contrib/restricted/boost/boost/thread/barrier.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/condition_variable.hpp (renamed from contrib/restricted/boost/boost/thread/condition_variable.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/functional.hpp (renamed from contrib/restricted/boost/boost/thread/csbl/functional.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_arg.hpp (renamed from contrib/restricted/boost/boost/thread/csbl/memory/allocator_arg.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_traits.hpp (renamed from contrib/restricted/boost/boost/thread/csbl/memory/allocator_traits.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/config.hpp (renamed from contrib/restricted/boost/boost/thread/csbl/memory/config.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/pointer_traits.hpp (renamed from contrib/restricted/boost/boost/thread/csbl/memory/pointer_traits.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/scoped_allocator.hpp (renamed from contrib/restricted/boost/boost/thread/csbl/memory/scoped_allocator.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/shared_ptr.hpp (renamed from contrib/restricted/boost/boost/thread/csbl/memory/shared_ptr.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/unique_ptr.hpp (renamed from contrib/restricted/boost/boost/thread/csbl/memory/unique_ptr.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/tuple.hpp (renamed from contrib/restricted/boost/boost/thread/csbl/tuple.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/vector.hpp (renamed from contrib/restricted/boost/boost/thread/csbl/vector.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/cv_status.hpp (renamed from contrib/restricted/boost/boost/thread/cv_status.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/atomic_redef_macros.hpp (renamed from contrib/restricted/boost/boost/thread/detail/atomic_redef_macros.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/atomic_undef_macros.hpp (renamed from contrib/restricted/boost/boost/thread/detail/atomic_undef_macros.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/config.hpp (renamed from contrib/restricted/boost/boost/thread/detail/config.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/delete.hpp (renamed from contrib/restricted/boost/boost/thread/detail/delete.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/invoke.hpp (renamed from contrib/restricted/boost/boost/thread/detail/invoke.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/invoker.hpp (renamed from contrib/restricted/boost/boost/thread/detail/invoker.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/is_convertible.hpp (renamed from contrib/restricted/boost/boost/thread/detail/is_convertible.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/lockable_wrapper.hpp (renamed from contrib/restricted/boost/boost/thread/detail/lockable_wrapper.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/make_tuple_indices.hpp (renamed from contrib/restricted/boost/boost/thread/detail/make_tuple_indices.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/memory.hpp (renamed from contrib/restricted/boost/boost/thread/detail/memory.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/move.hpp (renamed from contrib/restricted/boost/boost/thread/detail/move.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/nullary_function.hpp (renamed from contrib/restricted/boost/boost/thread/detail/nullary_function.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/platform.hpp (renamed from contrib/restricted/boost/boost/thread/detail/platform.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/platform_time.hpp (renamed from contrib/restricted/boost/boost/thread/detail/platform_time.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/thread.hpp (renamed from contrib/restricted/boost/boost/thread/detail/thread.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/thread_group.hpp (renamed from contrib/restricted/boost/boost/thread/detail/thread_group.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/thread_heap_alloc.hpp (renamed from contrib/restricted/boost/boost/thread/detail/thread_heap_alloc.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/thread_interruption.hpp (renamed from contrib/restricted/boost/boost/thread/detail/thread_interruption.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/variadic_footer.hpp (renamed from contrib/restricted/boost/boost/thread/detail/variadic_footer.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/variadic_header.hpp (renamed from contrib/restricted/boost/boost/thread/detail/variadic_header.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/exceptional_ptr.hpp (renamed from contrib/restricted/boost/boost/thread/exceptional_ptr.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/exceptions.hpp (renamed from contrib/restricted/boost/boost/thread/exceptions.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/executor.hpp (renamed from contrib/restricted/boost/boost/thread/executor.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/executors/executor.hpp (renamed from contrib/restricted/boost/boost/thread/executors/executor.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/executors/executor_adaptor.hpp (renamed from contrib/restricted/boost/boost/thread/executors/executor_adaptor.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/executors/generic_executor_ref.hpp (renamed from contrib/restricted/boost/boost/thread/executors/generic_executor_ref.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/executors/work.hpp (renamed from contrib/restricted/boost/boost/thread/executors/work.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/future.hpp (renamed from contrib/restricted/boost/boost/thread/future.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/futures/future_error.hpp (renamed from contrib/restricted/boost/boost/thread/futures/future_error.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/futures/future_error_code.hpp (renamed from contrib/restricted/boost/boost/thread/futures/future_error_code.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/futures/future_status.hpp (renamed from contrib/restricted/boost/boost/thread/futures/future_status.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/futures/is_future_type.hpp (renamed from contrib/restricted/boost/boost/thread/futures/is_future_type.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/futures/launch.hpp (renamed from contrib/restricted/boost/boost/thread/futures/launch.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_all.hpp (renamed from contrib/restricted/boost/boost/thread/futures/wait_for_all.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_any.hpp (renamed from contrib/restricted/boost/boost/thread/futures/wait_for_any.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/is_locked_by_this_thread.hpp (renamed from contrib/restricted/boost/boost/thread/is_locked_by_this_thread.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/lock_algorithms.hpp (renamed from contrib/restricted/boost/boost/thread/lock_algorithms.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/lock_guard.hpp (renamed from contrib/restricted/boost/boost/thread/lock_guard.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/lock_options.hpp (renamed from contrib/restricted/boost/boost/thread/lock_options.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/lock_types.hpp (renamed from contrib/restricted/boost/boost/thread/lock_types.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/lockable_traits.hpp (renamed from contrib/restricted/boost/boost/thread/lockable_traits.hpp)39
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/locks.hpp (renamed from contrib/restricted/boost/boost/thread/locks.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/mutex.hpp (renamed from contrib/restricted/boost/boost/thread/mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/once.hpp (renamed from contrib/restricted/boost/boost/thread/once.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/condition_variable.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/condition_variable.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/condition_variable_fwd.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/condition_variable_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/mutex.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/once.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/once.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/once_atomic.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/once_atomic.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/pthread_helpers.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/pthread_helpers.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/pthread_mutex_scoped_lock.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/recursive_mutex.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/recursive_mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/shared_mutex.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/shared_mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/thread_data.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/thread_data.hpp)4
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/pthread/thread_heap_alloc.hpp (renamed from contrib/restricted/boost/boost/thread/pthread/thread_heap_alloc.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/recursive_mutex.hpp (renamed from contrib/restricted/boost/boost/thread/recursive_mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/shared_lock_guard.hpp (renamed from contrib/restricted/boost/boost/thread/shared_lock_guard.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/shared_mutex.hpp (renamed from contrib/restricted/boost/boost/thread/shared_mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/thread.hpp (renamed from contrib/restricted/boost/boost/thread/thread.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/thread_only.hpp (renamed from contrib/restricted/boost/boost/thread/thread_only.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/thread_time.hpp (renamed from contrib/restricted/boost/boost/thread/thread_time.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/tss.hpp (renamed from contrib/restricted/boost/boost/thread/tss.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/v2/shared_mutex.hpp (renamed from contrib/restricted/boost/boost/thread/v2/shared_mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/basic_recursive_mutex.hpp (renamed from contrib/restricted/boost/boost/thread/win32/basic_recursive_mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/basic_timed_mutex.hpp (renamed from contrib/restricted/boost/boost/thread/win32/basic_timed_mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/condition_variable.hpp (renamed from contrib/restricted/boost/boost/thread/win32/condition_variable.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/interlocked_read.hpp (renamed from contrib/restricted/boost/boost/thread/win32/interlocked_read.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/mutex.hpp (renamed from contrib/restricted/boost/boost/thread/win32/mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/once.hpp (renamed from contrib/restricted/boost/boost/thread/win32/once.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/recursive_mutex.hpp (renamed from contrib/restricted/boost/boost/thread/win32/recursive_mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/shared_mutex.hpp (renamed from contrib/restricted/boost/boost/thread/win32/shared_mutex.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/thread_data.hpp (renamed from contrib/restricted/boost/boost/thread/win32/thread_data.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/thread_heap_alloc.hpp (renamed from contrib/restricted/boost/boost/thread/win32/thread_heap_alloc.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/thread_primitives.hpp (renamed from contrib/restricted/boost/boost/thread/win32/thread_primitives.hpp)0
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/xtime.hpp (renamed from contrib/restricted/boost/boost/thread/xtime.hpp)0
-rw-r--r--contrib/restricted/boost/thread/src/future.cpp (renamed from contrib/restricted/boost/libs/thread/src/future.cpp)0
-rw-r--r--contrib/restricted/boost/thread/src/pthread/once.cpp (renamed from contrib/restricted/boost/libs/thread/src/pthread/once.cpp)0
-rw-r--r--contrib/restricted/boost/thread/src/pthread/once_atomic.cpp (renamed from contrib/restricted/boost/libs/thread/src/pthread/once_atomic.cpp)0
-rw-r--r--contrib/restricted/boost/thread/src/pthread/thread.cpp (renamed from contrib/restricted/boost/libs/thread/src/pthread/thread.cpp)2
-rw-r--r--contrib/restricted/thrift/CMakeLists.txt2
177 files changed, 107 insertions, 11882 deletions
diff --git a/CMakeLists.darwin.txt b/CMakeLists.darwin.txt
index 57e65183ad..97356fe9e9 100644
--- a/CMakeLists.darwin.txt
+++ b/CMakeLists.darwin.txt
@@ -351,10 +351,10 @@ add_subdirectory(contrib/libs/libevent/event_core)
add_subdirectory(contrib/libs/libevent/event_extra)
add_subdirectory(contrib/libs/libevent/event_openssl)
add_subdirectory(contrib/libs/libevent/event_thread)
-add_subdirectory(contrib/restricted/boost/libs/thread)
-add_subdirectory(contrib/restricted/boost/date_time)
+add_subdirectory(contrib/restricted/boost/thread)
add_subdirectory(contrib/restricted/boost/chrono)
add_subdirectory(contrib/restricted/boost/ratio)
+add_subdirectory(contrib/restricted/boost/date_time)
add_subdirectory(contrib/restricted/uriparser)
add_subdirectory(contrib/libs/cctz/tzdata)
add_subdirectory(contrib/libs/cctz)
diff --git a/CMakeLists.linux.txt b/CMakeLists.linux.txt
index ffd2c3b61e..11e8b0e7de 100644
--- a/CMakeLists.linux.txt
+++ b/CMakeLists.linux.txt
@@ -354,10 +354,10 @@ add_subdirectory(contrib/libs/libevent/event_core)
add_subdirectory(contrib/libs/libevent/event_extra)
add_subdirectory(contrib/libs/libevent/event_openssl)
add_subdirectory(contrib/libs/libevent/event_thread)
-add_subdirectory(contrib/restricted/boost/libs/thread)
-add_subdirectory(contrib/restricted/boost/date_time)
+add_subdirectory(contrib/restricted/boost/thread)
add_subdirectory(contrib/restricted/boost/chrono)
add_subdirectory(contrib/restricted/boost/ratio)
+add_subdirectory(contrib/restricted/boost/date_time)
add_subdirectory(contrib/restricted/uriparser)
add_subdirectory(contrib/libs/cctz/tzdata)
add_subdirectory(contrib/libs/cctz)
diff --git a/contrib/restricted/boost/boost/thread/caller_context.hpp b/contrib/restricted/boost/boost/thread/caller_context.hpp
deleted file mode 100644
index dc50a05f97..0000000000
--- a/contrib/restricted/boost/boost/thread/caller_context.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// (C) Copyright 2013,2015 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)
-
-
-#ifndef BOOST_THREAD_CALL_CONTEXT_HPP
-#define BOOST_THREAD_CALL_CONTEXT_HPP
-
-#include <boost/thread/detail/config.hpp>
-#if defined BOOST_THREAD_USES_LOG_THREAD_ID
-#include <boost/thread/thread.hpp>
-#endif
-#include <boost/current_function.hpp>
-#include <boost/io/ios_state.hpp>
-#include <iomanip>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
- struct caller_context_t
- {
- const char * filename;
- unsigned lineno;
- const char * func;
- caller_context_t(const char * filename, unsigned lineno, const char * func) :
- filename(filename), lineno(lineno), func(func)
- {
- }
- };
-
-#define BOOST_CONTEXTOF boost::caller_context_t(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION)
-
- template <typename OStream>
- OStream& operator<<(OStream& os, caller_context_t const& ctx)
- {
-#if defined BOOST_THREAD_USES_LOG_THREAD_ID
- {
- io::ios_flags_saver ifs( os );
- os << std::left << std::setw(14) << boost::this_thread::get_id() << " ";
- }
-#endif
- {
- io::ios_flags_saver ifs(os);
- os << std::setw(50) << ctx.filename << "["
- << std::setw(4) << std::right << std::dec<< ctx.lineno << "] ";
-#if defined BOOST_THREAD_USES_LOG_CURRENT_FUNCTION
- os << ctx.func << " " ;
-#endif
- }
- return os;
- }
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/completion_latch.hpp b/contrib/restricted/boost/boost/thread/completion_latch.hpp
deleted file mode 100644
index 03f4e8962b..0000000000
--- a/contrib/restricted/boost/boost/thread/completion_latch.hpp
+++ /dev/null
@@ -1,225 +0,0 @@
-// 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)
-// (C) Copyright 2013 Vicente J. Botet Escriba
-
-#ifndef BOOST_THREAD_COMPLETION_LATCH_HPP
-#define BOOST_THREAD_COMPLETION_LATCH_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/counter.hpp>
-
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/lock_types.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <boost/chrono/duration.hpp>
-#include <boost/chrono/time_point.hpp>
-#include <boost/assert.hpp>
-//#include <boost/thread/detail/nullary_function.hpp>
-#include <boost/thread/csbl/functional.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
- namespace thread_detail
- {
- void noop()
- {
- }
- }
- class completion_latch
- {
- public:
- /// the implementation defined completion function type
- //typedef detail::nullary_function<void()> completion_function;
- typedef csbl::function<void()> completion_function;
- /// noop completion function factory
- static completion_function noop()
- {
- return completion_function(&thread_detail::noop);
- }
-
- private:
- struct around_wait;
- friend struct around_wait;
- struct around_wait
- {
- completion_latch &that_;
- boost::unique_lock<boost::mutex> &lk_;
- around_wait(completion_latch &that, boost::unique_lock<boost::mutex> &lk)
- : that_(that), lk_(lk)
- {
- that_.leavers_.cond_.wait(lk, detail::counter_is_zero(that_.leavers_));
- that_.waiters_.inc_and_notify_all();
- that_.leavers_.cond_.wait(lk, detail::counter_is_not_zero(that_.leavers_));
- }
- ~around_wait()
- {
- that_.waiters_.dec_and_notify_all();
- }
- };
-
- bool count_down(unique_lock<mutex> &lk)
- {
- BOOST_ASSERT(count_ > 0);
- if (--count_ == 0)
- {
- waiters_.cond_.wait(lk, detail::counter_is_not_zero(waiters_));
- leavers_.assign_and_notify_all(waiters_);
- count_.cond_.notify_all();
- waiters_.cond_.wait(lk, detail::counter_is_zero(waiters_));
- leavers_.assign_and_notify_all(0);
- lk.unlock();
- funct_();
- return true;
- }
- return false;
- }
-
- public:
- BOOST_THREAD_NO_COPYABLE( completion_latch )
-
- /// Constructs a latch with a given count.
- completion_latch(std::size_t count) :
- count_(count), funct_(noop()), waiters_(0), leavers_(0)
- {
- }
-
- /// Constructs a latch with a given count and a completion function.
- template <typename F>
- completion_latch(std::size_t count, BOOST_THREAD_RV_REF(F) funct) :
- count_(count),
- funct_(boost::move(funct)),
- waiters_(0),
- leavers_(0)
- {
- }
- completion_latch(std::size_t count, void(*funct)()) :
- count_(count), funct_(funct), waiters_(0), leavers_(0)
- {
- }
-
- ///
- ~completion_latch()
- {
- }
-
- /// Blocks until the latch has counted down to zero.
- void wait()
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- around_wait aw(*this, lk);
- count_.cond_.wait(lk, detail::counter_is_zero(count_));
- }
-
- /// @return true if the internal counter is already 0, false otherwise
- bool try_wait()
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- around_wait aw(*this, lk);
- return (count_ == 0);
- }
-
- /// try to wait for a specified amount of time
- /// @return whether there is a timeout or not.
- template <class Rep, class Period>
- cv_status wait_for(const chrono::duration<Rep, Period>& rel_time)
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- around_wait aw(*this, lk);
- return count_.cond_.wait_for(lk, rel_time, detail::counter_is_zero(count_))
- ? cv_status::no_timeout
- : cv_status::timeout;
- }
-
- /// try to wait until the specified time_point is reached
- /// @return whether there is a timeout or not.
- template <class Clock, class Duration>
- cv_status wait_until(const chrono::time_point<Clock, Duration>& abs_time)
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- around_wait aw(*this, lk);
- return count_.cond_.wait_until(lk, abs_time, detail::counter_is_zero(count_))
- ? cv_status::no_timeout
- : cv_status::timeout;
- }
-
- /// Decrement the count and notify anyone waiting if we reach zero.
- /// @Requires count must be greater than 0
- void count_down()
- {
- unique_lock<mutex> lk(mutex_);
- count_down(lk);
- }
- void signal()
- {
- count_down();
- }
-
- /// Decrement the count and notify anyone waiting if we reach zero.
- /// Blocks until the latch has counted down to zero.
- /// @Requires count must be greater than 0
- void count_down_and_wait()
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- if (count_down(lk))
- {
- return;
- }
- around_wait aw(*this, lk);
- count_.cond_.wait(lk, detail::counter_is_zero(count_));
- }
- void sync()
- {
- count_down_and_wait();
- }
-
- /// Reset the counter
- /// #Requires This method may only be invoked when there are no other threads currently inside the count_down_and_wait() method.
- void reset(std::size_t count)
- {
- boost::lock_guard<boost::mutex> lk(mutex_);
- //BOOST_ASSERT(count_ == 0);
- count_ = count;
- }
-
- /// Resets the latch with the new completion function.
- /// The next time the internal count reaches 0, this function will be invoked.
- /// This completion function may only be invoked when there are no other threads
- /// currently inside the count_down and wait related functions.
- /// It may also be invoked from within the registered completion function.
- /// @Returns the old completion function if any or noop if
-
-#ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
- template <typename F>
- completion_function then(BOOST_THREAD_RV_REF(F) funct)
- {
- boost::lock_guard<boost::mutex> lk(mutex_);
- completion_function tmp(funct_);
- funct_ = boost::move(funct);
- return tmp;
- }
-#endif
- completion_function then(void(*funct)())
- {
- boost::lock_guard<boost::mutex> lk(mutex_);
- completion_function tmp(funct_);
- funct_ = completion_function(funct);
- return tmp;
- }
-
- private:
- mutex mutex_;
- detail::counter count_;
- completion_function funct_;
- detail::counter waiters_;
- detail::counter leavers_;
- };
-
-} // namespace boost
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/deque_adaptor.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/deque_adaptor.hpp
deleted file mode 100644
index a8f45f863f..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/deque_adaptor.hpp
+++ /dev/null
@@ -1,209 +0,0 @@
-#ifndef BOOST_THREAD_CONCURRENT_DEQUE_ADAPTOR_HPP
-#define BOOST_THREAD_CONCURRENT_DEQUE_ADAPTOR_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-#include <boost/thread/concurrent_queues/deque_base.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
-namespace detail
-{
-
- template <typename Queue>
- class deque_adaptor_copyable_only :
- public boost::deque_base<typename Queue::value_type, typename Queue::size_type>
- {
- Queue queue;
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
-
- // Constructors/Assignment/Destructors
- deque_adaptor_copyable_only() {}
-
- // Observers
- bool empty() const { return queue.empty(); }
- bool full() const { return queue.full(); }
- size_type size() const { return queue.size(); }
- bool closed() const { return queue.closed(); }
-
- // Modifiers
- void close() { queue.close(); }
-
- void push_back(const value_type& x) { queue.push_back(x); }
-
- void pull_front(value_type& x) { queue.pull_front(x); };
- value_type pull_front() { return queue.pull_front(); }
-
- queue_op_status try_push_back(const value_type& x) { return queue.try_push_back(x); }
- queue_op_status try_pull_front(value_type& x) { return queue.try_pull_front(x); }
-
- queue_op_status nonblocking_push_back(const value_type& x) { return queue.nonblocking_push_back(x); }
- queue_op_status nonblocking_pull_front(value_type& x) { return queue.nonblocking_pull_front(x); }
-
- queue_op_status wait_push_back(const value_type& x) { return queue.wait_push_back(x); }
- queue_op_status wait_pull_front(value_type& x) { return queue.wait_pull_front(x); }
-
- };
- template <typename Queue>
- class deque_adaptor_movable_only :
- public boost::deque_base<typename Queue::value_type, typename Queue::size_type>
- {
- Queue queue;
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
-
- // Constructors/Assignment/Destructors
-
- deque_adaptor_movable_only() {}
-
- // Observers
- bool empty() const { return queue.empty(); }
- bool full() const { return queue.full(); }
- size_type size() const { return queue.size(); }
- bool closed() const { return queue.closed(); }
-
- // Modifiers
- void close() { queue.close(); }
-
-
- void pull_front(value_type& x) { queue.pull_front(x); };
- // enable_if is_nothrow_copy_movable<value_type>
- value_type pull_front() { return queue.pull_front(); }
-
- queue_op_status try_pull_front(value_type& x) { return queue.try_pull_front(x); }
-
- queue_op_status nonblocking_pull_front(value_type& x) { return queue.nonblocking_pull_front(x); }
-
- queue_op_status wait_pull_front(value_type& x) { return queue.wait_pull_front(x); }
-
- void push_back(BOOST_THREAD_RV_REF(value_type) x) { queue.push_back(boost::move(x)); }
- queue_op_status try_push_back(BOOST_THREAD_RV_REF(value_type) x) { return queue.try_push_back(boost::move(x)); }
- queue_op_status nonblocking_push_back(BOOST_THREAD_RV_REF(value_type) x) { return queue.nonblocking_push_back(boost::move(x)); }
- queue_op_status wait_push_back(BOOST_THREAD_RV_REF(value_type) x) { return queue.wait_push_back(boost::move(x)); }
- };
-
- template <typename Queue>
- class deque_adaptor_copyable_and_movable :
- public boost::deque_base<typename Queue::value_type, typename Queue::size_type>
- {
- Queue queue;
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
-
- // Constructors/Assignment/Destructors
-
- deque_adaptor_copyable_and_movable() {}
-
- // Observers
- bool empty() const { return queue.empty(); }
- bool full() const { return queue.full(); }
- size_type size() const { return queue.size(); }
- bool closed() const { return queue.closed(); }
-
- // Modifiers
- void close() { queue.close(); }
-
-
- void push_back(const value_type& x) { queue.push_back(x); }
-
- void pull_front(value_type& x) { queue.pull_front(x); };
- // enable_if is_nothrow_copy_movable<value_type>
- value_type pull_front() { return queue.pull_front(); }
-
- queue_op_status try_push_back(const value_type& x) { return queue.try_push_back(x); }
- queue_op_status try_pull_front(value_type& x) { return queue.try_pull_front(x); }
-
- queue_op_status nonblocking_push_back(const value_type& x) { return queue.nonblocking_push_back(x); }
- queue_op_status nonblocking_pull_front(value_type& x) { return queue.nonblocking_pull_front(x); }
-
- queue_op_status wait_push_back(const value_type& x) { return queue.wait_push_back(x); }
- queue_op_status wait_pull_front(value_type& x) { return queue.wait_pull_front(x); }
-
- void push_back(BOOST_THREAD_RV_REF(value_type) x) { queue.push_back(boost::move(x)); }
- queue_op_status try_push_back(BOOST_THREAD_RV_REF(value_type) x) { return queue.try_push_back(boost::move(x)); }
- queue_op_status nonblocking_push_back(BOOST_THREAD_RV_REF(value_type) x) { return queue.nonblocking_push_back(boost::move(x)); }
- queue_op_status wait_push_back(BOOST_THREAD_RV_REF(value_type) x) { return queue.wait_push_back(boost::move(x)); }
- };
-
-
- template <class Q, class T,
-#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
-#if defined __GNUC__ && ! defined __clang__
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = true
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif // __GNUC__
-#elif defined _MSC_VER
-#if _MSC_VER < 1700
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = true
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif // _MSC_VER
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif
-#else
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = has_move_emulation_enabled<T>::value
-#endif
- >
- struct deque_adaptor;
-
- template <class Q, class T>
- struct deque_adaptor<Q, T, true, true> {
- typedef deque_adaptor_copyable_and_movable<Q> type;
- };
- template <class Q, class T>
- struct deque_adaptor<Q, T, true, false> {
- typedef deque_adaptor_copyable_only<Q> type;
- };
- template <class Q, class T>
- struct deque_adaptor<Q, T, false, true> {
- typedef deque_adaptor_movable_only<Q> type;
- };
-
-}
-
- template <typename Queue>
- class deque_adaptor :
- public detail::deque_adaptor<Queue, typename Queue::value_type>::type
- {
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
- // Constructors/Assignment/Destructors
- virtual ~deque_adaptor() {};
- };
-}
-using concurrent::deque_adaptor;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/deque_base.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/deque_base.hpp
deleted file mode 100644
index f76e8a761d..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/deque_base.hpp
+++ /dev/null
@@ -1,202 +0,0 @@
-#ifndef BOOST_THREAD_CONCURRENT_DEQUE_BASE_HPP
-#define BOOST_THREAD_CONCURRENT_DEQUE_BASE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-#include <boost/type_traits/conditional.hpp>
-#include <boost/type_traits/is_copy_constructible.hpp>
-
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
-namespace detail
-{
-
- template <typename ValueType, class SizeType>
- class deque_base_copyable_only
- {
- public:
- typedef ValueType value_type;
- typedef SizeType size_type;
-
- // Constructors/Assignment/Destructors
- virtual ~deque_base_copyable_only() {};
-
- // Observers
- virtual bool empty() const = 0;
- virtual bool full() const = 0;
- virtual size_type size() const = 0;
- virtual bool closed() const = 0;
-
- // Modifiers
- virtual void close() = 0;
-
- virtual void push_back(const value_type& x) = 0;
-
- virtual void pull_front(value_type&) = 0;
- virtual value_type pull_front() = 0;
-
- virtual queue_op_status try_push_back(const value_type& x) = 0;
- virtual queue_op_status try_pull_front(value_type&) = 0;
-
- virtual queue_op_status nonblocking_push_back(const value_type& x) = 0;
- virtual queue_op_status nonblocking_pull_front(value_type&) = 0;
-
- virtual queue_op_status wait_push_back(const value_type& x) = 0;
- virtual queue_op_status wait_pull_front(value_type& elem) = 0;
-
- };
-
- template <typename ValueType, class SizeType>
- class deque_base_movable_only
- {
- public:
- typedef ValueType value_type;
- typedef SizeType size_type;
- // Constructors/Assignment/Destructors
- virtual ~deque_base_movable_only() {};
-
- // Observers
- virtual bool empty() const = 0;
- virtual bool full() const = 0;
- virtual size_type size() const = 0;
- virtual bool closed() const = 0;
-
- // Modifiers
- virtual void close() = 0;
-
- virtual void pull_front(value_type&) = 0;
- // enable_if is_nothrow_movable<value_type>
- virtual value_type pull_front() = 0;
-
- virtual queue_op_status try_pull_front(value_type&) = 0;
-
- virtual queue_op_status nonblocking_pull_front(value_type&) = 0;
-
- virtual queue_op_status wait_pull_front(value_type& elem) = 0;
-
- virtual void push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status try_push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status nonblocking_push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status wait_push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
- };
-
-
- template <typename ValueType, class SizeType>
- class deque_base_copyable_and_movable
- {
- public:
- typedef ValueType value_type;
- typedef SizeType size_type;
- // Constructors/Assignment/Destructors
- virtual ~deque_base_copyable_and_movable() {};
-
-
- // Observers
- virtual bool empty() const = 0;
- virtual bool full() const = 0;
- virtual size_type size() const = 0;
- virtual bool closed() const = 0;
-
- // Modifiers
- virtual void close() = 0;
-
- virtual void push_back(const value_type& x) = 0;
-
- virtual void pull_front(value_type&) = 0;
- // enable_if is_nothrow_copy_movable<value_type>
- virtual value_type pull_front() = 0;
-
- virtual queue_op_status try_push_back(const value_type& x) = 0;
- virtual queue_op_status try_pull_front(value_type&) = 0;
-
- virtual queue_op_status nonblocking_push_back(const value_type& x) = 0;
- virtual queue_op_status nonblocking_pull_front(value_type&) = 0;
-
- virtual queue_op_status wait_push_back(const value_type& x) = 0;
- virtual queue_op_status wait_pull_front(value_type& elem) = 0;
-
- virtual void push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status try_push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status nonblocking_push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status wait_push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
- };
-
- template <class T, class ST,
-#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
-#if defined __GNUC__ && ! defined __clang__
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = true
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif // __GNUC__
-#elif defined _MSC_VER
-#if _MSC_VER < 1700
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = true
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif // _MSC_VER
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif
-#else
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = has_move_emulation_enabled<T>::value
-#endif
- >
- struct deque_base;
-
- template <class T, class ST>
- struct deque_base<T, ST, true, true> {
- typedef deque_base_copyable_and_movable<T, ST> type;
- };
- template <class T, class ST>
- struct deque_base<T, ST, true, false> {
- typedef deque_base_copyable_only<T, ST> type;
- };
- template <class T, class ST>
- struct deque_base<T, ST, false, true> {
- typedef deque_base_movable_only<T, ST> type;
- };
-
-}
-
- template <class ValueType, class SizeType=std::size_t>
- class deque_base :
- public detail::deque_base<ValueType, SizeType>::type
- {
- public:
- typedef ValueType value_type;
- typedef SizeType size_type;
- // Constructors/Assignment/Destructors
- virtual ~deque_base() {};
- };
-
-}
-using concurrent::deque_base;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/deque_views.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/deque_views.hpp
deleted file mode 100644
index 5715fb88cf..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/deque_views.hpp
+++ /dev/null
@@ -1,165 +0,0 @@
-#ifndef BOOST_THREAD_QUEUE_VIEWS_HPP
-#define BOOST_THREAD_QUEUE_VIEWS_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-#include <boost/thread/concurrent_queues/deque_base.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
-
- template <typename Queue>
- class deque_back_view
- {
- Queue* queue;
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
-
- // Constructors/Assignment/Destructors
- deque_back_view(Queue& q) BOOST_NOEXCEPT : queue(&q) {}
-
- // Observers
- bool empty() const { return queue->empty(); }
- bool full() const { return queue->full(); }
- size_type size() const { return queue->size(); }
- bool closed() const { return queue->closed(); }
-
- // Modifiers
- void close() { queue->close(); }
-
- void push(const value_type& x) { queue->push_back(x); }
-
- void pull(value_type& x) { queue->pull_back(x); }
- // enable_if is_nothrow_copy_movable<value_type>
- value_type pull() { return queue->pull_back(); }
-
- queue_op_status try_push(const value_type& x) { return queue->try_push_back(x); }
-
- queue_op_status try_pull(value_type& x) { return queue->try_pull_back(x); }
-
- queue_op_status nonblocking_push(const value_type& x) { return queue->nonblocking_push_back(x); }
-
- queue_op_status nonblocking_pull(value_type& x) { return queue->nonblocking_pull_back(x); }
-
- queue_op_status wait_push(const value_type& x) { return queue->wait_push_back(x); }
- queue_op_status wait_pull(value_type& x) { return queue->wait_pull_back(x); }
-
- void push(BOOST_THREAD_RV_REF(value_type) x) { queue->push_back(boost::move(x)); }
- queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->try_push_back(boost::move(x)); }
- queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->nonblocking_push_back(boost::move(x)); }
- queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->wait_push_back(boost::move(x)); }
- };
-
- template <typename Queue>
- class deque_front_view
- {
- Queue* queue;
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
-
- // Constructors/Assignment/Destructors
- deque_front_view(Queue& q) BOOST_NOEXCEPT : queue(&q) {}
-
- // Observers
- bool empty() const { return queue->empty(); }
- bool full() const { return queue->full(); }
- size_type size() const { return queue->size(); }
- bool closed() const { return queue->closed(); }
-
- // Modifiers
- void close() { queue->close(); }
-
- void push(const value_type& x) { queue->push_front(x); }
-
- void pull(value_type& x) { queue->pull_front(x); };
- // enable_if is_nothrow_copy_movable<value_type>
- value_type pull() { return queue->pull_front(); }
-
- queue_op_status try_push(const value_type& x) { return queue->try_push_front(x); }
-
- queue_op_status try_pull(value_type& x) { return queue->try_pull_front(x); }
-
- queue_op_status nonblocking_push(const value_type& x) { return queue->nonblocking_push_front(x); }
-
- queue_op_status nonblocking_pull(value_type& x) { return queue->nonblocking_pull_front(x); }
-
- queue_op_status wait_push(const value_type& x) { return queue->wait_push_front(x); }
- queue_op_status wait_pull(value_type& x) { return queue->wait_pull_front(x); }
- void push(BOOST_THREAD_RV_REF(value_type) x) { queue->push_front(forward<value_type>(x)); }
- queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->try_push_front(forward<value_type>(x)); }
- queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->nonblocking_push_front(forward<value_type>(x)); }
- queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->wait_push_front(forward<value_type>(x)); }
-
- };
-
-#if ! defined BOOST_NO_CXX11_TEMPLATE_ALIASES
-
- template <class T>
- using deque_back = deque_back_view<deque_base<T> > ;
- template <class T>
- using deque_front = deque_front_view<deque_base<T> > ;
-
-#else
-
- template <class T>
- struct deque_back : deque_back_view<deque_base<T> >
- {
- typedef deque_back_view<deque_base<T> > base_type;
- deque_back(deque_base<T>& q) BOOST_NOEXCEPT : base_type(q) {}
- };
- template <class T>
- struct deque_front : deque_front_view<deque_base<T> >
- {
- typedef deque_front_view<deque_base<T> > base_type;
- deque_front(deque_base<T>& q) BOOST_NOEXCEPT : base_type(q) {}
-
- };
-
-#endif
-
-// template <class Queue>
-// deque_back_view<Queue> back(Queue & q) { return deque_back_view<Queue>(q); }
-// template <class Queue>
-// deque_front_view<Queue> front(Queue & q) { return deque_front_view<Queue>(q); }
-//#if 0
-// template <class T>
-// deque_back<T> back(deque_base<T> & q) { return deque_back<T>(q); }
-// template <class T>
-// deque_front<T> front(deque_base<T> & q) { return deque_front<T>(q); }
-//#else
-// template <class T>
-// typename deque_back<T>::type back(deque_base<T> & q) { return typename deque_back<T>::type(q); }
-// template <class T>
-// typename deque_front<T>::type front(deque_base<T> & q) { return typename deque_front<T>::type(q); }
-//#endif
-}
-
-using concurrent::deque_back_view;
-using concurrent::deque_front_view;
-using concurrent::deque_back;
-using concurrent::deque_front;
-//using concurrent::back;
-//using concurrent::front;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/detail/sync_deque_base.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/detail/sync_deque_base.hpp
deleted file mode 100644
index e3ecad15de..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/detail/sync_deque_base.hpp
+++ /dev/null
@@ -1,223 +0,0 @@
-#ifndef BOOST_THREAD_CONCURRENT_QUEUES_DETAIL_SYNC_DEQUE_BASE_HPP
-#define BOOST_THREAD_CONCURRENT_QUEUES_DETAIL_SYNC_DEQUE_BASE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2013-2017. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/bind.hpp>
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-
-#include <boost/chrono/time_point.hpp>
-#include <boost/throw_exception.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
-namespace detail
-{
-
- template <class ValueType, class Queue>
- class sync_deque_base
- {
- public:
- typedef ValueType value_type;
- typedef Queue underlying_queue_type;
- typedef typename Queue::size_type size_type;
- typedef queue_op_status op_status;
-
- // Constructors/Assignment/Destructors
- BOOST_THREAD_NO_COPYABLE(sync_deque_base)
- inline sync_deque_base();
- //template <typename Range>
- //inline explicit sync_deque(Range range);
- inline ~sync_deque_base();
-
- // Observers
- inline bool empty() const;
- inline bool full() const;
- inline size_type size() const;
- inline bool closed() const;
-
- // Modifiers
- inline void close();
-
- inline underlying_queue_type underlying_queue() {
- lock_guard<mutex> lk(mtx_);
- return boost::move(data_);
- }
-
- protected:
- mutable mutex mtx_;
- condition_variable not_empty_;
- underlying_queue_type data_;
- bool closed_;
-
- inline bool empty(unique_lock<mutex>& ) const BOOST_NOEXCEPT
- {
- return data_.empty();
- }
- inline bool empty(lock_guard<mutex>& ) const BOOST_NOEXCEPT
- {
- return data_.empty();
- }
-
- inline size_type size(lock_guard<mutex>& ) const BOOST_NOEXCEPT
- {
- return data_.size();
- }
- inline bool closed(unique_lock<mutex>& lk) const;
- inline bool closed(lock_guard<mutex>& lk) const;
-
- inline void throw_if_closed(unique_lock<mutex>&);
- inline void throw_if_closed(lock_guard<mutex>&);
-
- inline bool not_empty_or_closed(unique_lock<mutex>& ) const;
-
- inline bool wait_until_not_empty_or_closed(unique_lock<mutex>& lk);
- template <class WClock, class Duration>
- queue_op_status wait_until_not_empty_or_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp);
- template <class WClock, class Duration>
- queue_op_status wait_until_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp);
-
- inline void notify_not_empty_if_needed(unique_lock<mutex>& )
- {
- not_empty_.notify_one();
- }
- inline void notify_not_empty_if_needed(lock_guard<mutex>& )
- {
- not_empty_.notify_one();
- }
-
- };
-
- template <class ValueType, class Queue>
- sync_deque_base<ValueType, Queue>::sync_deque_base() :
- data_(), closed_(false)
- {
- BOOST_ASSERT(data_.empty());
- }
-
- template <class ValueType, class Queue>
- sync_deque_base<ValueType, Queue>::~sync_deque_base()
- {
- }
-
- template <class ValueType, class Queue>
- void sync_deque_base<ValueType, Queue>::close()
- {
- {
- lock_guard<mutex> lk(mtx_);
- closed_ = true;
- }
- not_empty_.notify_all();
- }
-
- template <class ValueType, class Queue>
- bool sync_deque_base<ValueType, Queue>::closed() const
- {
- lock_guard<mutex> lk(mtx_);
- return closed(lk);
- }
- template <class ValueType, class Queue>
- bool sync_deque_base<ValueType, Queue>::closed(unique_lock<mutex>&) const
- {
- return closed_;
- }
- template <class ValueType, class Queue>
- bool sync_deque_base<ValueType, Queue>::closed(lock_guard<mutex>&) const
- {
- return closed_;
- }
-
- template <class ValueType, class Queue>
- bool sync_deque_base<ValueType, Queue>::empty() const
- {
- lock_guard<mutex> lk(mtx_);
- return empty(lk);
- }
- template <class ValueType, class Queue>
- bool sync_deque_base<ValueType, Queue>::full() const
- {
- return false;
- }
-
- template <class ValueType, class Queue>
- typename sync_deque_base<ValueType, Queue>::size_type sync_deque_base<ValueType, Queue>::size() const
- {
- lock_guard<mutex> lk(mtx_);
- return size(lk);
- }
-
- template <class ValueType, class Queue>
- void sync_deque_base<ValueType, Queue>::throw_if_closed(unique_lock<mutex>& lk)
- {
- if (closed(lk))
- {
- BOOST_THROW_EXCEPTION( sync_deque_is_closed() );
- }
- }
- template <class ValueType, class Queue>
- void sync_deque_base<ValueType, Queue>::throw_if_closed(lock_guard<mutex>& lk)
- {
- if (closed(lk))
- {
- BOOST_THROW_EXCEPTION( sync_deque_is_closed() );
- }
- }
-
- template <class ValueType, class Queue>
- bool sync_deque_base<ValueType, Queue>::not_empty_or_closed(unique_lock<mutex>& ) const
- {
- return ! data_.empty() || closed_;
- }
-
- template <class ValueType, class Queue>
- bool sync_deque_base<ValueType, Queue>::wait_until_not_empty_or_closed(unique_lock<mutex>& lk)
- {
- not_empty_.wait(lk, boost::bind(&sync_deque_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk)));
- if (! empty(lk)) return false; // success
- return true; // closed
- }
-
- template <class ValueType, class Queue>
- 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)
- {
- if (! not_empty_.wait_until(lk, tp, boost::bind(&sync_deque_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk))))
- return queue_op_status::timeout;
- if (! empty(lk)) return queue_op_status::success;
- return queue_op_status::closed;
- }
-
- template <class ValueType, class Queue>
- template <class WClock, class Duration>
- queue_op_status sync_deque_base<ValueType, Queue>::wait_until_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp)
- {
- bool (sync_queue_base<ValueType, Queue>::*closed_function_ptr)(unique_lock<mutex>&) const = &sync_queue_base<ValueType, Queue>::closed;
- if (! not_empty_.wait_until(lk, tp, boost::bind(closed_function_ptr, boost::ref(*this), boost::ref(lk))))
- return queue_op_status::timeout;
- return queue_op_status::closed;
- }
-
-} // detail
-} // concurrent
-} // boost
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/detail/sync_queue_base.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/detail/sync_queue_base.hpp
deleted file mode 100644
index c570da9505..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/detail/sync_queue_base.hpp
+++ /dev/null
@@ -1,223 +0,0 @@
-#ifndef BOOST_THREAD_CONCURRENT_QUEUES_DETAIL_SYNC_QUEUE_BASE_HPP
-#define BOOST_THREAD_CONCURRENT_QUEUES_DETAIL_SYNC_QUEUE_BASE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2013-2017. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/bind.hpp>
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-
-#include <boost/chrono/time_point.hpp>
-#include <boost/throw_exception.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
-namespace detail
-{
-
- template <class ValueType, class Queue>
- class sync_queue_base
- {
- public:
- typedef ValueType value_type;
- typedef Queue underlying_queue_type;
- typedef typename Queue::size_type size_type;
- typedef queue_op_status op_status;
-
- // Constructors/Assignment/Destructors
- BOOST_THREAD_NO_COPYABLE(sync_queue_base)
- inline sync_queue_base();
- //template <typename Range>
- //inline explicit sync_queue(Range range);
- inline ~sync_queue_base();
-
- // Observers
- inline bool empty() const;
- inline bool full() const;
- inline size_type size() const;
- inline bool closed() const;
-
- // Modifiers
- inline void close();
-
- inline underlying_queue_type underlying_queue() {
- lock_guard<mutex> lk(mtx_);
- return boost::move(data_);
- }
-
- protected:
- mutable mutex mtx_;
- condition_variable not_empty_;
- underlying_queue_type data_;
- bool closed_;
-
- inline bool empty(unique_lock<mutex>& ) const BOOST_NOEXCEPT
- {
- return data_.empty();
- }
- inline bool empty(lock_guard<mutex>& ) const BOOST_NOEXCEPT
- {
- return data_.empty();
- }
-
- inline size_type size(lock_guard<mutex>& ) const BOOST_NOEXCEPT
- {
- return data_.size();
- }
- inline bool closed(unique_lock<mutex>& lk) const;
- inline bool closed(lock_guard<mutex>& lk) const;
-
- inline void throw_if_closed(unique_lock<mutex>&);
- inline void throw_if_closed(lock_guard<mutex>&);
-
- inline bool not_empty_or_closed(unique_lock<mutex>& ) const;
-
- inline bool wait_until_not_empty_or_closed(unique_lock<mutex>& lk);
- template <class WClock, class Duration>
- queue_op_status wait_until_not_empty_or_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp);
- template <class WClock, class Duration>
- queue_op_status wait_until_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp);
-
- inline void notify_not_empty_if_needed(unique_lock<mutex>& )
- {
- not_empty_.notify_one();
- }
- inline void notify_not_empty_if_needed(lock_guard<mutex>& )
- {
- not_empty_.notify_one();
- }
-
- };
-
- template <class ValueType, class Queue>
- sync_queue_base<ValueType, Queue>::sync_queue_base() :
- data_(), closed_(false)
- {
- BOOST_ASSERT(data_.empty());
- }
-
- template <class ValueType, class Queue>
- sync_queue_base<ValueType, Queue>::~sync_queue_base()
- {
- }
-
- template <class ValueType, class Queue>
- void sync_queue_base<ValueType, Queue>::close()
- {
- {
- lock_guard<mutex> lk(mtx_);
- closed_ = true;
- }
- not_empty_.notify_all();
- }
-
- template <class ValueType, class Queue>
- bool sync_queue_base<ValueType, Queue>::closed() const
- {
- lock_guard<mutex> lk(mtx_);
- return closed(lk);
- }
- template <class ValueType, class Queue>
- bool sync_queue_base<ValueType, Queue>::closed(unique_lock<mutex>&) const
- {
- return closed_;
- }
- template <class ValueType, class Queue>
- bool sync_queue_base<ValueType, Queue>::closed(lock_guard<mutex>&) const
- {
- return closed_;
- }
-
- template <class ValueType, class Queue>
- bool sync_queue_base<ValueType, Queue>::empty() const
- {
- lock_guard<mutex> lk(mtx_);
- return empty(lk);
- }
- template <class ValueType, class Queue>
- bool sync_queue_base<ValueType, Queue>::full() const
- {
- return false;
- }
-
- template <class ValueType, class Queue>
- typename sync_queue_base<ValueType, Queue>::size_type sync_queue_base<ValueType, Queue>::size() const
- {
- lock_guard<mutex> lk(mtx_);
- return size(lk);
- }
-
- template <class ValueType, class Queue>
- void sync_queue_base<ValueType, Queue>::throw_if_closed(unique_lock<mutex>& lk)
- {
- if (closed(lk))
- {
- BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- }
- }
- template <class ValueType, class Queue>
- void sync_queue_base<ValueType, Queue>::throw_if_closed(lock_guard<mutex>& lk)
- {
- if (closed(lk))
- {
- BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- }
- }
-
- template <class ValueType, class Queue>
- bool sync_queue_base<ValueType, Queue>::not_empty_or_closed(unique_lock<mutex>& ) const
- {
- return ! data_.empty() || closed_;
- }
-
- template <class ValueType, class Queue>
- bool sync_queue_base<ValueType, Queue>::wait_until_not_empty_or_closed(unique_lock<mutex>& lk)
- {
- not_empty_.wait(lk, boost::bind(&sync_queue_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk)));
- if (! empty(lk)) return false; // success
- return true; // closed
- }
-
- template <class ValueType, class Queue>
- 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)
- {
- if (! not_empty_.wait_until(lk, tp, boost::bind(&sync_queue_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk))))
- return queue_op_status::timeout;
- if (! empty(lk)) return queue_op_status::success;
- return queue_op_status::closed;
- }
-
- template <class ValueType, class Queue>
- template <class WClock, class Duration>
- queue_op_status sync_queue_base<ValueType, Queue>::wait_until_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp)
- {
- bool (sync_queue_base<ValueType, Queue>::*closed_function_ptr)(unique_lock<mutex>&) const = &sync_queue_base<ValueType, Queue>::closed;
- if (! not_empty_.wait_until(lk, tp, boost::bind(closed_function_ptr, boost::ref(*this), boost::ref(lk))))
- return queue_op_status::timeout;
- return queue_op_status::closed;
- }
-
-} // detail
-} // concurrent
-} // boost
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/queue_adaptor.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/queue_adaptor.hpp
deleted file mode 100644
index f04e0354f7..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/queue_adaptor.hpp
+++ /dev/null
@@ -1,209 +0,0 @@
-#ifndef BOOST_THREAD_QUEUE_ADAPTOR_HPP
-#define BOOST_THREAD_QUEUE_ADAPTOR_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-#include <boost/thread/concurrent_queues/queue_base.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
-namespace detail
-{
-
- template <typename Queue>
- class queue_adaptor_copyable_only :
- public boost::queue_base<typename Queue::value_type, typename Queue::size_type>
- {
- Queue queue;
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
-
- // Constructors/Assignment/Destructors
- queue_adaptor_copyable_only() {}
-
- // Observers
- bool empty() const { return queue.empty(); }
- bool full() const { return queue.full(); }
- size_type size() const { return queue.size(); }
- bool closed() const { return queue.closed(); }
-
- // Modifiers
- void close() { queue.close(); }
-
- void push(const value_type& x) { queue.push(x); }
-
- void pull(value_type& x) { queue.pull(x); };
- value_type pull() { return queue.pull(); }
-
- queue_op_status try_push(const value_type& x) { return queue.try_push(x); }
- queue_op_status try_pull(value_type& x) { return queue.try_pull(x); }
-
- queue_op_status nonblocking_push(const value_type& x) { return queue.nonblocking_push(x); }
- queue_op_status nonblocking_pull(value_type& x) { return queue.nonblocking_pull(x); }
-
- queue_op_status wait_push(const value_type& x) { return queue.wait_push(x); }
- queue_op_status wait_pull(value_type& x) { return queue.wait_pull(x); }
-
- };
- template <typename Queue>
- class queue_adaptor_movable_only :
- public boost::queue_base<typename Queue::value_type, typename Queue::size_type>
- {
- Queue queue;
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
-
- // Constructors/Assignment/Destructors
-
- queue_adaptor_movable_only() {}
-
- // Observers
- bool empty() const { return queue.empty(); }
- bool full() const { return queue.full(); }
- size_type size() const { return queue.size(); }
- bool closed() const { return queue.closed(); }
-
- // Modifiers
- void close() { queue.close(); }
-
-
- void pull(value_type& x) { queue.pull(x); };
- // enable_if is_nothrow_copy_movable<value_type>
- value_type pull() { return queue.pull(); }
-
- queue_op_status try_pull(value_type& x) { return queue.try_pull(x); }
-
- queue_op_status nonblocking_pull(value_type& x) { return queue.nonblocking_pull(x); }
-
- queue_op_status wait_pull(value_type& x) { return queue.wait_pull(x); }
-
- void push(BOOST_THREAD_RV_REF(value_type) x) { queue.push(boost::move(x)); }
- queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x) { return queue.try_push(boost::move(x)); }
- queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x) { return queue.nonblocking_push(boost::move(x)); }
- queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x) { return queue.wait_push(boost::move(x)); }
- };
-
- template <typename Queue>
- class queue_adaptor_copyable_and_movable :
- public boost::queue_base<typename Queue::value_type, typename Queue::size_type>
- {
- Queue queue;
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
-
- // Constructors/Assignment/Destructors
-
- queue_adaptor_copyable_and_movable() {}
-
- // Observers
- bool empty() const { return queue.empty(); }
- bool full() const { return queue.full(); }
- size_type size() const { return queue.size(); }
- bool closed() const { return queue.closed(); }
-
- // Modifiers
- void close() { queue.close(); }
-
-
- void push(const value_type& x) { queue.push(x); }
-
- void pull(value_type& x) { queue.pull(x); };
- // enable_if is_nothrow_copy_movable<value_type>
- value_type pull() { return queue.pull(); }
-
- queue_op_status try_push(const value_type& x) { return queue.try_push(x); }
- queue_op_status try_pull(value_type& x) { return queue.try_pull(x); }
-
- queue_op_status nonblocking_push(const value_type& x) { return queue.nonblocking_push(x); }
- queue_op_status nonblocking_pull(value_type& x) { return queue.nonblocking_pull(x); }
-
- queue_op_status wait_push(const value_type& x) { return queue.wait_push(x); }
- queue_op_status wait_pull(value_type& x) { return queue.wait_pull(x); }
-
- void push(BOOST_THREAD_RV_REF(value_type) x) { queue.push(boost::move(x)); }
- queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x) { return queue.try_push(boost::move(x)); }
- queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x) { return queue.nonblocking_push(boost::move(x)); }
- queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x) { return queue.wait_push(boost::move(x)); }
- };
-
-
- template <class Q, class T,
-#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
-#if defined __GNUC__ && ! defined __clang__
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = true
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif // __GNUC__
-#elif defined _MSC_VER
-#if _MSC_VER < 1700
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = true
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif // _MSC_VER
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif
-#else
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = has_move_emulation_enabled<T>::value
-#endif
- >
- struct queue_adaptor;
-
- template <class Q, class T>
- struct queue_adaptor<Q, T, true, true> {
- typedef queue_adaptor_copyable_and_movable<Q> type;
- };
- template <class Q, class T>
- struct queue_adaptor<Q, T, true, false> {
- typedef queue_adaptor_copyable_only<Q> type;
- };
- template <class Q, class T>
- struct queue_adaptor<Q, T, false, true> {
- typedef queue_adaptor_movable_only<Q> type;
- };
-
-}
-
- template <typename Queue>
- class queue_adaptor :
- public detail::queue_adaptor<Queue, typename Queue::value_type>::type
- {
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
- // Constructors/Assignment/Destructors
- virtual ~queue_adaptor() {};
- };
-}
-using concurrent::queue_adaptor;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/queue_base.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/queue_base.hpp
deleted file mode 100644
index 0d42839158..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/queue_base.hpp
+++ /dev/null
@@ -1,202 +0,0 @@
-#ifndef BOOST_THREAD_QUEUE_BASE_HPP
-#define BOOST_THREAD_QUEUE_BASE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-#include <boost/type_traits/conditional.hpp>
-#include <boost/type_traits/is_copy_constructible.hpp>
-
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
-namespace detail
-{
-
- template <typename ValueType, class SizeType>
- class queue_base_copyable_only
- {
- public:
- typedef ValueType value_type;
- typedef SizeType size_type;
-
- // Constructors/Assignment/Destructors
- virtual ~queue_base_copyable_only() {};
-
- // Observers
- virtual bool empty() const = 0;
- virtual bool full() const = 0;
- virtual size_type size() const = 0;
- virtual bool closed() const = 0;
-
- // Modifiers
- virtual void close() = 0;
-
- virtual void push(const value_type& x) = 0;
-
- virtual void pull(value_type&) = 0;
- virtual value_type pull() = 0;
-
- virtual queue_op_status try_push(const value_type& x) = 0;
- virtual queue_op_status try_pull(value_type&) = 0;
-
- virtual queue_op_status nonblocking_push(const value_type& x) = 0;
- virtual queue_op_status nonblocking_pull(value_type&) = 0;
-
- virtual queue_op_status wait_push(const value_type& x) = 0;
- virtual queue_op_status wait_pull(ValueType& elem) = 0;
-
- };
-
- template <typename ValueType, class SizeType>
- class queue_base_movable_only
- {
- public:
- typedef ValueType value_type;
- typedef SizeType size_type;
- // Constructors/Assignment/Destructors
- virtual ~queue_base_movable_only() {};
-
- // Observers
- virtual bool empty() const = 0;
- virtual bool full() const = 0;
- virtual size_type size() const = 0;
- virtual bool closed() const = 0;
-
- // Modifiers
- virtual void close() = 0;
-
- virtual void pull(value_type&) = 0;
- // enable_if is_nothrow_movable<value_type>
- virtual value_type pull() = 0;
-
- virtual queue_op_status try_pull(value_type&) = 0;
-
- virtual queue_op_status nonblocking_pull(value_type&) = 0;
-
- virtual queue_op_status wait_pull(value_type& elem) = 0;
-
- virtual void push(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x) = 0;
- };
-
-
- template <typename ValueType, class SizeType>
- class queue_base_copyable_and_movable
- {
- public:
- typedef ValueType value_type;
- typedef SizeType size_type;
- // Constructors/Assignment/Destructors
- virtual ~queue_base_copyable_and_movable() {};
-
-
- // Observers
- virtual bool empty() const = 0;
- virtual bool full() const = 0;
- virtual size_type size() const = 0;
- virtual bool closed() const = 0;
-
- // Modifiers
- virtual void close() = 0;
-
- virtual void push(const value_type& x) = 0;
-
- virtual void pull(value_type&) = 0;
- // enable_if is_nothrow_copy_movable<value_type>
- virtual value_type pull() = 0;
-
- virtual queue_op_status try_push(const value_type& x) = 0;
- virtual queue_op_status try_pull(value_type&) = 0;
-
- virtual queue_op_status nonblocking_push(const value_type& x) = 0;
- virtual queue_op_status nonblocking_pull(value_type&) = 0;
-
- virtual queue_op_status wait_push(const value_type& x) = 0;
- virtual queue_op_status wait_pull(value_type& elem) = 0;
-
- virtual void push(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x) = 0;
- virtual queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x) = 0;
- };
-
- template <class T, class ST,
-#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
-#if defined __GNUC__ && ! defined __clang__
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = true
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif // __GNUC__
-#elif defined _MSC_VER
-#if _MSC_VER < 1700
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = true
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif // _MSC_VER
-#else
- bool Copyable = std::is_copy_constructible<T>::value && std::is_copy_assignable<T>::value,
- bool Movable = std::is_move_constructible<T>::value && std::is_move_assignable<T>::value
-#endif
-#else
- bool Copyable = is_copy_constructible<T>::value,
- bool Movable = has_move_emulation_enabled<T>::value
-#endif
- >
- struct queue_base;
-
- template <class T, class ST>
- struct queue_base<T, ST, true, true> {
- typedef queue_base_copyable_and_movable<T, ST> type;
- };
- template <class T, class ST>
- struct queue_base<T, ST, true, false> {
- typedef queue_base_copyable_only<T, ST> type;
- };
- template <class T, class ST>
- struct queue_base<T, ST, false, true> {
- typedef queue_base_movable_only<T, ST> type;
- };
-
-}
-
- template <typename ValueType, class SizeType=std::size_t>
- class queue_base :
- public detail::queue_base<ValueType, SizeType>::type
- {
- public:
- typedef ValueType value_type;
- typedef SizeType size_type;
- // Constructors/Assignment/Destructors
- virtual ~queue_base() {};
- };
-
-}
-using concurrent::queue_base;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/queue_op_status.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/queue_op_status.hpp
deleted file mode 100644
index 197650d052..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/queue_op_status.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef BOOST_THREAD_QUEUE_OP_STATUS_HPP
-#define BOOST_THREAD_QUEUE_OP_STATUS_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/move.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
-
- BOOST_SCOPED_ENUM_DECLARE_BEGIN(queue_op_status)
- { success = 0, empty, full, closed, busy, timeout, not_ready }
- BOOST_SCOPED_ENUM_DECLARE_END(queue_op_status)
-
- struct sync_queue_is_closed : std::exception
- {
- };
-
-}
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- struct no_block_tag{};
- BOOST_CONSTEXPR_OR_CONST no_block_tag no_block = {};
-#endif
-
- using concurrent::queue_op_status;
- using concurrent::sync_queue_is_closed;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/queue_views.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/queue_views.hpp
deleted file mode 100644
index d04f54ed70..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/queue_views.hpp
+++ /dev/null
@@ -1,144 +0,0 @@
-#ifndef BOOST_THREAD_QUEUE_VIEWS_HPP
-#define BOOST_THREAD_QUEUE_VIEWS_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-#include <boost/thread/concurrent_queues/queue_base.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
-
- template <typename Queue>
- class queue_back_view
- {
- Queue* queue;
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
-
- // Constructors/Assignment/Destructors
- queue_back_view(Queue& q) BOOST_NOEXCEPT : queue(&q) {}
-
- // Observers
- bool empty() const { return queue->empty(); }
- bool full() const { return queue->full(); }
- size_type size() const { return queue->size(); }
- bool closed() const { return queue->closed(); }
-
- // Modifiers
- void close() { queue->close(); }
-
- void push(const value_type& x) { queue->push(x); }
-
- queue_op_status try_push(const value_type& x) { return queue->try_push(x); }
-
- queue_op_status nonblocking_push(const value_type& x) { return queue->nonblocking_push(x); }
- queue_op_status wait_push(const value_type& x) { return queue->wait_push(x); }
-
- void push(BOOST_THREAD_RV_REF(value_type) x) { queue->push(boost::move(x)); }
- queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->try_push(boost::move(x)); }
- queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->nonblocking_push(boost::move(x)); }
- queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->wait_push(boost::move(x)); }
- };
-
- template <typename Queue>
- class queue_front_view
- {
- Queue* queue;
- public:
- typedef typename Queue::value_type value_type;
- typedef typename Queue::size_type size_type;
-
- // Constructors/Assignment/Destructors
- queue_front_view(Queue& q) BOOST_NOEXCEPT : queue(&q) {}
-
- // Observers
- bool empty() const { return queue->empty(); }
- bool full() const { return queue->full(); }
- size_type size() const { return queue->size(); }
- bool closed() const { return queue->closed(); }
-
- // Modifiers
- void close() { queue->close(); }
-
- void pull(value_type& x) { queue->pull(x); };
- // enable_if is_nothrow_copy_movable<value_type>
- value_type pull() { return queue->pull(); }
-
- queue_op_status try_pull(value_type& x) { return queue->try_pull(x); }
-
- queue_op_status nonblocking_pull(value_type& x) { return queue->nonblocking_pull(x); }
-
- queue_op_status wait_pull(value_type& x) { return queue->wait_pull(x); }
-
- };
-
-#if ! defined BOOST_NO_CXX11_TEMPLATE_ALIASES
-
- template <class T>
- using queue_back = queue_back_view<queue_base<T> > ;
- template <class T>
- using queue_front = queue_front_view<queue_base<T> > ;
-
-#else
-
- template <class T>
- struct queue_back : queue_back_view<queue_base<T> >
- {
- typedef queue_back_view<queue_base<T> > base_type;
- queue_back(queue_base<T>& q) BOOST_NOEXCEPT : base_type(q) {}
- };
- template <class T>
- struct queue_front : queue_front_view<queue_base<T> >
- {
- typedef queue_front_view<queue_base<T> > base_type;
- queue_front(queue_base<T>& q) BOOST_NOEXCEPT : base_type(q) {}
-
- };
-
-#endif
-
-// template <class Queue>
-// queue_back_view<Queue> back(Queue & q) { return queue_back_view<Queue>(q); }
-// template <class Queue>
-// queue_front_view<Queue> front(Queue & q) { return queue_front_view<Queue>(q); }
-//#if 0
-// template <class T>
-// queue_back<T> back(queue_base<T> & q) { return queue_back<T>(q); }
-// template <class T>
-// queue_front<T> front(queue_base<T> & q) { return queue_front<T>(q); }
-//#else
-// template <class T>
-// typename queue_back<T>::type back(queue_base<T> & q) { return typename queue_back<T>::type(q); }
-// template <class T>
-// typename queue_front<T>::type front(queue_base<T> & q) { return typename queue_front<T>::type(q); }
-//#endif
-}
-
-using concurrent::queue_back_view;
-using concurrent::queue_front_view;
-using concurrent::queue_back;
-using concurrent::queue_front;
-//using concurrent::back;
-//using concurrent::front;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/sync_bounded_queue.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/sync_bounded_queue.hpp
deleted file mode 100644
index fd36f8c1a4..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/sync_bounded_queue.hpp
+++ /dev/null
@@ -1,727 +0,0 @@
-#ifndef BOOST_THREAD_CONCURRENT_QUEUES_SYNC_BOUNDED_QUEUE_HPP
-#define BOOST_THREAD_CONCURRENT_QUEUES_SYNC_BOUNDED_QUEUE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2013-2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
-#include <boost/smart_ptr/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-#endif
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
- template <typename ValueType>
- class sync_bounded_queue
- {
- public:
- typedef ValueType value_type;
- typedef std::size_t size_type;
-
- // Constructors/Assignment/Destructors
- BOOST_THREAD_NO_COPYABLE(sync_bounded_queue)
- explicit sync_bounded_queue(size_type max_elems);
- template <typename Range>
- sync_bounded_queue(size_type max_elems, Range range);
- ~sync_bounded_queue();
-
- // Observers
- inline bool empty() const;
- inline bool full() const;
- inline size_type capacity() const;
- inline size_type size() const;
- inline bool closed() const;
-
- // Modifiers
- inline void close();
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- inline void push(const value_type& x);
- inline void push(BOOST_THREAD_RV_REF(value_type) x);
- inline bool try_push(const value_type& x);
- inline bool try_push(BOOST_THREAD_RV_REF(value_type) x);
- inline bool try_push(no_block_tag, const value_type& x);
- inline bool try_push(no_block_tag, BOOST_THREAD_RV_REF(value_type) x);
-#endif
- inline void push_back(const value_type& x);
- inline void push_back(BOOST_THREAD_RV_REF(value_type) x);
- inline queue_op_status try_push_back(const value_type& x);
- inline queue_op_status try_push_back(BOOST_THREAD_RV_REF(value_type) x);
- inline queue_op_status nonblocking_push_back(const value_type& x);
- inline queue_op_status nonblocking_push_back(BOOST_THREAD_RV_REF(value_type) x);
- inline queue_op_status wait_push_back(const value_type& x);
- inline queue_op_status wait_push_back(BOOST_THREAD_RV_REF(value_type) x);
-
- // Observers/Modifiers
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- inline void pull(value_type&);
- // enable_if is_nothrow_copy_movable<value_type>
- inline value_type pull();
- inline shared_ptr<ValueType> ptr_pull();
- inline bool try_pull(value_type&);
- inline bool try_pull(no_block_tag,value_type&);
- inline shared_ptr<ValueType> try_pull();
-#endif
- inline void pull_front(value_type&);
- // enable_if is_nothrow_copy_movable<value_type>
- inline value_type pull_front();
- inline queue_op_status try_pull_front(value_type&);
- inline queue_op_status nonblocking_pull_front(value_type&);
-
- inline queue_op_status wait_pull_front(ValueType& elem);
-
- private:
- mutable mutex mtx_;
- condition_variable not_empty_;
- condition_variable not_full_;
- size_type waiting_full_;
- size_type waiting_empty_;
- value_type* data_;
- size_type in_;
- size_type out_;
- size_type capacity_;
- bool closed_;
-
- inline size_type inc(size_type idx) const BOOST_NOEXCEPT
- {
- return (idx + 1) % capacity_;
- }
-
- inline bool empty(unique_lock<mutex>& ) const BOOST_NOEXCEPT
- {
- return in_ == out_;
- }
- inline bool empty(lock_guard<mutex>& ) const BOOST_NOEXCEPT
- {
- return in_ == out_;
- }
- inline bool full(unique_lock<mutex>& ) const BOOST_NOEXCEPT
- {
- return (inc(in_) == out_);
- }
- inline bool full(lock_guard<mutex>& ) const BOOST_NOEXCEPT
- {
- return (inc(in_) == out_);
- }
- inline size_type capacity(lock_guard<mutex>& ) const BOOST_NOEXCEPT
- {
- return capacity_-1;
- }
- inline size_type size(lock_guard<mutex>& lk) const BOOST_NOEXCEPT
- {
- if (full(lk)) return capacity(lk);
- return ((in_+capacity(lk)-out_) % capacity(lk));
- }
-
- inline void throw_if_closed(unique_lock<mutex>&);
- inline bool closed(unique_lock<mutex>&) const;
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- inline bool try_pull(value_type& x, unique_lock<mutex>& lk);
- inline shared_ptr<value_type> try_pull(unique_lock<mutex>& lk);
- inline bool try_push(const value_type& x, unique_lock<mutex>& lk);
- inline bool try_push(BOOST_THREAD_RV_REF(value_type) x, unique_lock<mutex>& lk);
-#endif
- inline queue_op_status try_pull_front(value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status try_push_back(const value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status try_push_back(BOOST_THREAD_RV_REF(value_type) x, unique_lock<mutex>& lk);
-
- inline queue_op_status wait_pull_front(value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status wait_push_back(const value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status wait_push_back(BOOST_THREAD_RV_REF(value_type) x, unique_lock<mutex>& lk);
-
- inline void wait_until_not_empty(unique_lock<mutex>& lk);
- inline void wait_until_not_empty(unique_lock<mutex>& lk, bool&);
- inline size_type wait_until_not_full(unique_lock<mutex>& lk);
- inline size_type wait_until_not_full(unique_lock<mutex>& lk, bool&);
-
-
- inline void notify_not_empty_if_needed(unique_lock<mutex>& lk)
- {
- if (waiting_empty_ > 0)
- {
- --waiting_empty_;
- lk.unlock();
- not_empty_.notify_one();
- }
- }
- inline void notify_not_full_if_needed(unique_lock<mutex>& lk)
- {
- if (waiting_full_ > 0)
- {
- --waiting_full_;
- lk.unlock();
- not_full_.notify_one();
- }
- }
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- inline void pull(value_type& elem, unique_lock<mutex>& lk)
- {
- elem = boost::move(data_[out_]);
- out_ = inc(out_);
- notify_not_full_if_needed(lk);
- }
- inline value_type pull(unique_lock<mutex>& lk)
- {
- value_type elem = boost::move(data_[out_]);
- out_ = inc(out_);
- notify_not_full_if_needed(lk);
- return boost::move(elem);
- }
- inline boost::shared_ptr<value_type> ptr_pull(unique_lock<mutex>& lk)
- {
- shared_ptr<value_type> res = make_shared<value_type>(boost::move(data_[out_]));
- out_ = inc(out_);
- notify_not_full_if_needed(lk);
- return res;
- }
-#endif
- inline void pull_front(value_type& elem, unique_lock<mutex>& lk)
- {
- elem = boost::move(data_[out_]);
- out_ = inc(out_);
- notify_not_full_if_needed(lk);
- }
- inline value_type pull_front(unique_lock<mutex>& lk)
- {
- value_type elem = boost::move(data_[out_]);
- out_ = inc(out_);
- notify_not_full_if_needed(lk);
- return boost::move(elem);
- }
-
- inline void set_in(size_type in, unique_lock<mutex>& lk)
- {
- in_ = in;
- notify_not_empty_if_needed(lk);
- }
-
- inline void push_at(const value_type& elem, size_type in_p_1, unique_lock<mutex>& lk)
- {
- data_[in_] = elem;
- set_in(in_p_1, lk);
- }
-
- inline void push_at(BOOST_THREAD_RV_REF(value_type) elem, size_type in_p_1, unique_lock<mutex>& lk)
- {
- data_[in_] = boost::move(elem);
- set_in(in_p_1, lk);
- }
- };
-
- template <typename ValueType>
- sync_bounded_queue<ValueType>::sync_bounded_queue(typename sync_bounded_queue<ValueType>::size_type max_elems) :
- waiting_full_(0), waiting_empty_(0), data_(new value_type[max_elems + 1]), in_(0), out_(0), capacity_(max_elems + 1),
- closed_(false)
- {
- BOOST_ASSERT_MSG(max_elems >= 1, "number of elements must be > 1");
- }
-
-// template <typename ValueType>
-// template <typename Range>
-// sync_bounded_queue<ValueType>::sync_bounded_queue(size_type max_elems, Range range) :
-// waiting_full_(0), waiting_empty_(0), data_(new value_type[max_elems + 1]), in_(0), out_(0), capacity_(max_elems + 1),
-// closed_(false)
-// {
-// BOOST_ASSERT_MSG(max_elems >= 1, "number of elements must be > 1");
-// BOOST_ASSERT_MSG(max_elems == size(range), "number of elements must match range's size");
-// try
-// {
-// typedef typename Range::iterator iterator_t;
-// iterator_t first = boost::begin(range);
-// iterator_t end = boost::end(range);
-// size_type in = 0;
-// for (iterator_t cur = first; cur != end; ++cur, ++in)
-// {
-// data_[in] = *cur;
-// }
-// set_in(in);
-// }
-// catch (...)
-// {
-// delete[] data_;
-// }
-// }
-
- template <typename ValueType>
- sync_bounded_queue<ValueType>::~sync_bounded_queue()
- {
- delete[] data_;
- }
-
- template <typename ValueType>
- void sync_bounded_queue<ValueType>::close()
- {
- {
- lock_guard<mutex> lk(mtx_);
- closed_ = true;
- }
- not_empty_.notify_all();
- not_full_.notify_all();
- }
-
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::closed() const
- {
- lock_guard<mutex> lk(mtx_);
- return closed_;
- }
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::closed(unique_lock<mutex>& ) const
- {
- return closed_;
- }
-
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::empty() const
- {
- lock_guard<mutex> lk(mtx_);
- return empty(lk);
- }
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::full() const
- {
- lock_guard<mutex> lk(mtx_);
- return full(lk);
- }
-
- template <typename ValueType>
- typename sync_bounded_queue<ValueType>::size_type sync_bounded_queue<ValueType>::capacity() const
- {
- lock_guard<mutex> lk(mtx_);
- return capacity(lk);
- }
-
- template <typename ValueType>
- typename sync_bounded_queue<ValueType>::size_type sync_bounded_queue<ValueType>::size() const
- {
- lock_guard<mutex> lk(mtx_);
- return size(lk);
- }
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::try_pull(ValueType& elem, unique_lock<mutex>& lk)
- {
- if (empty(lk))
- {
- throw_if_closed(lk);
- return false;
- }
- pull(elem, lk);
- return true;
- }
- template <typename ValueType>
- shared_ptr<ValueType> sync_bounded_queue<ValueType>::try_pull(unique_lock<mutex>& lk)
- {
- if (empty(lk))
- {
- throw_if_closed(lk);
- return shared_ptr<ValueType>();
- }
- return ptr_pull(lk);
- }
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::try_pull(ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_);
- return try_pull(elem, lk);
- }
-#endif
-
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::try_pull_front(ValueType& elem, unique_lock<mutex>& lk)
- {
- if (empty(lk))
- {
- if (closed(lk)) return queue_op_status::closed;
- return queue_op_status::empty;
- }
- pull_front(elem, lk);
- return queue_op_status::success;
- }
-
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::try_pull_front(ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_);
- return try_pull_front(elem, lk);
- }
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::try_pull(no_block_tag,ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_, try_to_lock);
- if (!lk.owns_lock())
- {
- return false;
- }
- return try_pull(elem, lk);
- }
- template <typename ValueType>
- boost::shared_ptr<ValueType> sync_bounded_queue<ValueType>::try_pull()
- {
- unique_lock<mutex> lk(mtx_);
- return try_pull(lk);
- }
-#endif
-
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::nonblocking_pull_front(ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_, try_to_lock);
- if (!lk.owns_lock())
- {
- return queue_op_status::busy;
- }
- return try_pull_front(elem, lk);
- }
-
- template <typename ValueType>
- void sync_bounded_queue<ValueType>::throw_if_closed(unique_lock<mutex>&)
- {
- if (closed_)
- {
- BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- }
- }
-
- template <typename ValueType>
- void sync_bounded_queue<ValueType>::wait_until_not_empty(unique_lock<mutex>& lk)
- {
- for (;;)
- {
- if (out_ != in_) break;
- throw_if_closed(lk);
- ++waiting_empty_;
- not_empty_.wait(lk);
- }
- }
- template <typename ValueType>
- void sync_bounded_queue<ValueType>::wait_until_not_empty(unique_lock<mutex>& lk, bool & closed)
- {
- for (;;)
- {
- if (out_ != in_) break;
- if (closed_) {closed=true; return;}
- ++waiting_empty_;
- not_empty_.wait(lk);
- }
- }
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- template <typename ValueType>
- void sync_bounded_queue<ValueType>::pull(ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_);
- wait_until_not_empty(lk);
- pull(elem, lk);
- }
-// template <typename ValueType>
-// void sync_bounded_queue<ValueType>::pull(ValueType& elem, bool & closed)
-// {
-// unique_lock<mutex> lk(mtx_);
-// wait_until_not_empty(lk, closed);
-// if (closed) {return;}
-// pull(elem, lk);
-// }
-
- // enable if ValueType is nothrow movable
- template <typename ValueType>
- ValueType sync_bounded_queue<ValueType>::pull()
- {
- unique_lock<mutex> lk(mtx_);
- wait_until_not_empty(lk);
- return pull(lk);
- }
- template <typename ValueType>
- boost::shared_ptr<ValueType> sync_bounded_queue<ValueType>::ptr_pull()
- {
- unique_lock<mutex> lk(mtx_);
- wait_until_not_empty(lk);
- return ptr_pull(lk);
- }
-
-#endif
-
- template <typename ValueType>
- void sync_bounded_queue<ValueType>::pull_front(ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_);
- wait_until_not_empty(lk);
- pull_front(elem, lk);
- }
-
- // enable if ValueType is nothrow movable
- template <typename ValueType>
- ValueType sync_bounded_queue<ValueType>::pull_front()
- {
- unique_lock<mutex> lk(mtx_);
- wait_until_not_empty(lk);
- return pull_front(lk);
- }
-
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::wait_pull_front(ValueType& elem, unique_lock<mutex>& lk)
- {
- if (empty(lk) && closed(lk)) {return queue_op_status::closed;}
- bool is_closed = false;
- wait_until_not_empty(lk, is_closed);
- if (is_closed) {return queue_op_status::closed;}
- pull_front(elem, lk);
- return queue_op_status::success;
- }
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::wait_pull_front(ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_);
- return wait_pull_front(elem, lk);
- }
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::try_push(const ValueType& elem, unique_lock<mutex>& lk)
- {
- throw_if_closed(lk);
- size_type in_p_1 = inc(in_);
- if (in_p_1 == out_) // full()
- {
- return false;
- }
- push_at(elem, in_p_1, lk);
- return true;
- }
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::try_push(const ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_);
- return try_push(elem, lk);
- }
-
-#endif
-
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::try_push_back(const ValueType& elem, unique_lock<mutex>& lk)
- {
- if (closed(lk)) return queue_op_status::closed;
- size_type in_p_1 = inc(in_);
- if (in_p_1 == out_) // full()
- {
- return queue_op_status::full;
- }
- push_at(elem, in_p_1, lk);
- return queue_op_status::success;
- }
-
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::try_push_back(const ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_);
- return try_push_back(elem, lk);
- }
-
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::wait_push_back(const ValueType& elem, unique_lock<mutex>& lk)
- {
- if (closed(lk)) return queue_op_status::closed;
- push_at(elem, wait_until_not_full(lk), lk);
- return queue_op_status::success;
- }
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::wait_push_back(const ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_);
- return wait_push_back(elem, lk);
- }
-
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::try_push(no_block_tag, const ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_, try_to_lock);
- if (!lk.owns_lock()) return false;
- return try_push(elem, lk);
- }
-#endif
-
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::nonblocking_push_back(const ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_, try_to_lock);
- if (!lk.owns_lock()) return queue_op_status::busy;
- return try_push_back(elem, lk);
- }
-
- template <typename ValueType>
- typename sync_bounded_queue<ValueType>::size_type sync_bounded_queue<ValueType>::wait_until_not_full(unique_lock<mutex>& lk)
- {
- for (;;)
- {
- throw_if_closed(lk);
- size_type in_p_1 = inc(in_);
- if (in_p_1 != out_) // ! full()
- {
- return in_p_1;
- }
- ++waiting_full_;
- not_full_.wait(lk);
- }
- }
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- template <typename ValueType>
- void sync_bounded_queue<ValueType>::push(const ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_);
- push_at(elem, wait_until_not_full(lk), lk);
- }
-#endif
- template <typename ValueType>
- void sync_bounded_queue<ValueType>::push_back(const ValueType& elem)
- {
- unique_lock<mutex> lk(mtx_);
- push_at(elem, wait_until_not_full(lk), lk);
- }
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::try_push(BOOST_THREAD_RV_REF(ValueType) elem, unique_lock<mutex>& lk)
- {
- throw_if_closed(lk);
- size_type in_p_1 = inc(in_);
- if (in_p_1 == out_) // full()
- {
- return false;
- }
- push_at(boost::move(elem), in_p_1, lk);
- return true;
- }
-
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::try_push(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(mtx_);
- return try_push(boost::move(elem), lk);
- }
-#endif
-
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::try_push_back(BOOST_THREAD_RV_REF(ValueType) elem, unique_lock<mutex>& lk)
- {
- if (closed(lk)) return queue_op_status::closed;
- size_type in_p_1 = inc(in_);
- if (in_p_1 == out_) // full()
- {
- return queue_op_status::full;
- }
- push_at(boost::move(elem), in_p_1, lk);
- return queue_op_status::success;
- }
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::try_push_back(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(mtx_);
- return try_push_back(boost::move(elem), lk);
- }
-
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::wait_push_back(BOOST_THREAD_RV_REF(ValueType) elem, unique_lock<mutex>& lk)
- {
- if (closed(lk)) return queue_op_status::closed;
- push_at(boost::move(elem), wait_until_not_full(lk), lk);
- return queue_op_status::success;
- }
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::wait_push_back(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(mtx_);
- return try_push_back(boost::move(elem), lk);
- }
-
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- template <typename ValueType>
- bool sync_bounded_queue<ValueType>::try_push(no_block_tag, BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(mtx_, try_to_lock);
- if (!lk.owns_lock())
- {
- return false;
- }
- return try_push(boost::move(elem), lk);
- }
-#endif
- template <typename ValueType>
- queue_op_status sync_bounded_queue<ValueType>::nonblocking_push_back(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(mtx_, try_to_lock);
- if (!lk.owns_lock())
- {
- return queue_op_status::busy;
- }
- return try_push_back(boost::move(elem), lk);
- }
-
-#ifndef BOOST_THREAD_QUEUE_DEPRECATE_OLD
- template <typename ValueType>
- void sync_bounded_queue<ValueType>::push(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(mtx_);
- push_at(boost::move(elem), wait_until_not_full(lk), lk);
- }
-#endif
- template <typename ValueType>
- void sync_bounded_queue<ValueType>::push_back(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(mtx_);
- push_at(boost::move(elem), wait_until_not_full(lk), lk);
- }
-
- template <typename ValueType>
- sync_bounded_queue<ValueType>& operator<<(sync_bounded_queue<ValueType>& sbq, BOOST_THREAD_RV_REF(ValueType) elem)
- {
- sbq.push_back(boost::move(elem));
- return sbq;
- }
-
- template <typename ValueType>
- sync_bounded_queue<ValueType>& operator<<(sync_bounded_queue<ValueType>& sbq, ValueType const&elem)
- {
- sbq.push_back(elem);
- return sbq;
- }
-
- template <typename ValueType>
- sync_bounded_queue<ValueType>& operator>>(sync_bounded_queue<ValueType>& sbq, ValueType &elem)
- {
- sbq.pull_front(elem);
- return sbq;
- }
-}
-using concurrent::sync_bounded_queue;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/sync_deque.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/sync_deque.hpp
deleted file mode 100644
index c6159c4be0..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/sync_deque.hpp
+++ /dev/null
@@ -1,325 +0,0 @@
-#ifndef BOOST_THREAD_CONCURRENT_QUEUES_SYNC_DEQUE_HPP
-#define BOOST_THREAD_CONCURRENT_QUEUES_SYNC_DEQUE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2013-2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/concurrent_queues/detail/sync_queue_base.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <boost/thread/csbl/devector.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/mutex.hpp>
-
-#include <boost/throw_exception.hpp>
-#include <boost/smart_ptr/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
- template <class ValueType, class Container = csbl::devector<ValueType> >
- class sync_deque
- : public detail::sync_queue_base<ValueType, Container >
- {
- typedef detail::sync_queue_base<ValueType, Container > super;
-
- public:
- typedef ValueType value_type;
- //typedef typename super::value_type value_type; // fixme
- typedef typename super::underlying_queue_type underlying_queue_type;
- typedef typename super::size_type size_type;
- typedef typename super::op_status op_status;
-
- // Constructors/Assignment/Destructors
- BOOST_THREAD_NO_COPYABLE(sync_deque)
- inline sync_deque();
- //template <typename Range>
- //inline explicit sync_deque(Range range);
- inline ~sync_deque();
-
- // Modifiers
- inline void push_back(const value_type& x);
- inline queue_op_status try_push_back(const value_type& x);
- inline queue_op_status nonblocking_push_back(const value_type& x);
- inline queue_op_status wait_push_back(const value_type& x);
- inline void push_back(BOOST_THREAD_RV_REF(value_type) x);
- inline queue_op_status try_push_back(BOOST_THREAD_RV_REF(value_type) x);
- inline queue_op_status nonblocking_push_back(BOOST_THREAD_RV_REF(value_type) x);
- inline queue_op_status wait_push_back(BOOST_THREAD_RV_REF(value_type) x);
-
- // Observers/Modifiers
- inline void pull_front(value_type&);
- // enable_if is_nothrow_copy_movable<value_type>
- inline value_type pull_front();
-
- inline queue_op_status try_pull_front(value_type&);
- inline queue_op_status nonblocking_pull_front(value_type&);
- inline queue_op_status wait_pull_front(ValueType& elem);
-
- private:
-
- inline queue_op_status try_pull_front(value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status wait_pull_front(value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status try_push_back(const value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status wait_push_back(const value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status try_push_back(BOOST_THREAD_RV_REF(value_type) x, unique_lock<mutex>& lk);
- inline queue_op_status wait_push_back(BOOST_THREAD_RV_REF(value_type) x, unique_lock<mutex>& lk);
-
- inline void pull_front(value_type& elem, unique_lock<mutex>& )
- {
- elem = boost::move(super::data_.front());
- super::data_.pop_front();
- }
- inline value_type pull_front(unique_lock<mutex>& )
- {
- value_type e = boost::move(super::data_.front());
- super::data_.pop_front();
- return boost::move(e);
- }
-
- inline void push_back(const value_type& elem, unique_lock<mutex>& lk)
- {
- super::data_.push_back(elem);
- super::notify_not_empty_if_needed(lk);
- }
-
- inline void push_back(BOOST_THREAD_RV_REF(value_type) elem, unique_lock<mutex>& lk)
- {
- super::data_.push_back(boost::move(elem));
- super::notify_not_empty_if_needed(lk);
- }
- };
-
- template <class ValueType, class Container>
- sync_deque<ValueType, Container>::sync_deque() :
- super()
- {
- }
-
-// template <class ValueType, class Container>
-// template <class Range>
-// explicit sync_deque<ValueType, Container>::sync_deque(Range range) :
-// data_(), closed_(false)
-// {
-// try
-// {
-// typedef typename Range::iterator iterator_t;
-// iterator_t first = boost::begin(range);
-// iterator_t end = boost::end(range);
-// for (iterator_t cur = first; cur != end; ++cur)
-// {
-// data_.push(boost::move(*cur));;
-// }
-// notify_not_empty_if_needed(lk);
-// }
-// catch (...)
-// {
-// delete[] data_;
-// }
-// }
-
- template <class ValueType, class Container>
- sync_deque<ValueType, Container>::~sync_deque()
- {
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::try_pull_front(ValueType& elem, unique_lock<mutex>& lk)
- {
- if (super::empty(lk))
- {
- if (super::closed(lk)) return queue_op_status::closed;
- return queue_op_status::empty;
- }
- pull_front(elem, lk);
- return queue_op_status::success;
- }
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::wait_pull_front(ValueType& elem, unique_lock<mutex>& lk)
- {
- const bool has_been_closed = super::wait_until_not_empty_or_closed(lk);
- if (has_been_closed) return queue_op_status::closed;
- pull_front(elem, lk);
- return queue_op_status::success;
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::try_pull_front(ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return try_pull_front(elem, lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::wait_pull_front(ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return wait_pull_front(elem, lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::nonblocking_pull_front(ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_, try_to_lock);
- if (!lk.owns_lock())
- {
- return queue_op_status::busy;
- }
- return try_pull_front(elem, lk);
- }
-
- template <class ValueType, class Container>
- void sync_deque<ValueType, Container>::pull_front(ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- const bool has_been_closed = super::wait_until_not_empty_or_closed(lk);
- if (has_been_closed) super::throw_if_closed(lk);
- pull_front(elem, lk);
- }
-
- // enable if ValueType is nothrow movable
- template <class ValueType, class Container>
- ValueType sync_deque<ValueType, Container>::pull_front()
- {
- unique_lock<mutex> lk(super::mtx_);
- const bool has_been_closed = super::wait_until_not_empty_or_closed(lk);
- if (has_been_closed) super::throw_if_closed(lk);
- return pull_front(lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::try_push_back(const ValueType& elem, unique_lock<mutex>& lk)
- {
- if (super::closed(lk)) return queue_op_status::closed;
- push_back(elem, lk);
- return queue_op_status::success;
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::try_push_back(const ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return try_push_back(elem, lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::wait_push_back(const ValueType& elem, unique_lock<mutex>& lk)
- {
- if (super::closed(lk)) return queue_op_status::closed;
- push_back(elem, lk);
- return queue_op_status::success;
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::wait_push_back(const ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return wait_push_back(elem, lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::nonblocking_push_back(const ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_, try_to_lock);
- if (!lk.owns_lock()) return queue_op_status::busy;
- return try_push_back(elem, lk);
- }
-
- template <class ValueType, class Container>
- void sync_deque<ValueType, Container>::push_back(const ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- super::throw_if_closed(lk);
- push_back(elem, lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::try_push_back(BOOST_THREAD_RV_REF(ValueType) elem, unique_lock<mutex>& lk)
- {
- if (super::closed(lk)) return queue_op_status::closed;
- push_back(boost::move(elem), lk);
- return queue_op_status::success;
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::try_push_back(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return try_push_back(boost::move(elem), lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::wait_push_back(BOOST_THREAD_RV_REF(ValueType) elem, unique_lock<mutex>& lk)
- {
- if (super::closed(lk)) return queue_op_status::closed;
- push_back(boost::move(elem), lk);
- return queue_op_status::success;
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::wait_push_back(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return wait_push_back(boost::move(elem), lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_deque<ValueType, Container>::nonblocking_push_back(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(super::mtx_, try_to_lock);
- if (!lk.owns_lock())
- {
- return queue_op_status::busy;
- }
- return try_push_back(boost::move(elem), lk);
- }
-
- template <class ValueType, class Container>
- void sync_deque<ValueType, Container>::push_back(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- super::throw_if_closed(lk);
- push_back(boost::move(elem), lk);
- }
-
- template <class ValueType, class Container>
- sync_deque<ValueType, Container>& operator<<(sync_deque<ValueType, Container>& sbq, BOOST_THREAD_RV_REF(ValueType) elem)
- {
- sbq.push_back(boost::move(elem));
- return sbq;
- }
-
- template <class ValueType, class Container>
- sync_deque<ValueType, Container>& operator<<(sync_deque<ValueType, Container>& sbq, ValueType const&elem)
- {
- sbq.push_back(elem);
- return sbq;
- }
-
- template <class ValueType, class Container>
- sync_deque<ValueType, Container>& operator>>(sync_deque<ValueType, Container>& sbq, ValueType &elem)
- {
- sbq.pull_front(elem);
- return sbq;
- }
-
-}
-using concurrent::sync_deque;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/sync_priority_queue.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/sync_priority_queue.hpp
deleted file mode 100644
index 2c6881f90f..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/sync_priority_queue.hpp
+++ /dev/null
@@ -1,369 +0,0 @@
-// Copyright (C) 2014 Ian Forbed
-// Copyright (C) 2014-2017 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)
-//
-
-#ifndef BOOST_THREAD_SYNC_PRIORITY_QUEUE
-#define BOOST_THREAD_SYNC_PRIORITY_QUEUE
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/thread/concurrent_queues/detail/sync_queue_base.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <boost/thread/csbl/vector.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/mutex.hpp>
-
-#include <boost/atomic.hpp>
-#include <boost/chrono/duration.hpp>
-#include <boost/chrono/time_point.hpp>
-
-#include <exception>
-#include <queue>
-#include <utility>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace detail {
-
- template <
- class Type,
- class Container = csbl::vector<Type>,
- class Compare = std::less<Type>
- >
- class priority_queue
- {
- private:
- Container _elements;
- Compare _compare;
- public:
- typedef Type value_type;
- typedef typename Container::size_type size_type;
-
- explicit priority_queue(const Compare& compare = Compare())
- : _elements(), _compare(compare)
- { }
-
- size_type size() const
- {
- return _elements.size();
- }
-
- bool empty() const
- {
- return _elements.empty();
- }
-
- void push(Type const& element)
- {
- _elements.push_back(element);
- std::push_heap(_elements.begin(), _elements.end(), _compare);
- }
- void push(BOOST_RV_REF(Type) element)
- {
- _elements.push_back(boost::move(element));
- std::push_heap(_elements.begin(), _elements.end(), _compare);
- }
-
- void pop()
- {
- std::pop_heap(_elements.begin(), _elements.end(), _compare);
- _elements.pop_back();
- }
- Type pull()
- {
- Type result = boost::move(_elements.front());
- pop();
- return boost::move(result);
- }
-
- Type const& top() const
- {
- return _elements.front();
- }
- };
-}
-
-namespace concurrent
-{
- template <class ValueType,
- class Container = csbl::vector<ValueType>,
- class Compare = std::less<typename Container::value_type> >
- class sync_priority_queue
- : public detail::sync_queue_base<ValueType, boost::detail::priority_queue<ValueType,Container,Compare> >
- {
- typedef detail::sync_queue_base<ValueType, boost::detail::priority_queue<ValueType,Container,Compare> > super;
-
- public:
- typedef ValueType value_type;
- //typedef typename super::value_type value_type; // fixme
- typedef typename super::underlying_queue_type underlying_queue_type;
- typedef typename super::size_type size_type;
- typedef typename super::op_status op_status;
-
- typedef chrono::steady_clock clock;
- protected:
-
- public:
- sync_priority_queue() {}
-
- ~sync_priority_queue()
- {
- if(!super::closed())
- {
- super::close();
- }
- }
-
- void push(const ValueType& elem);
- void push(BOOST_THREAD_RV_REF(ValueType) elem);
-
- queue_op_status try_push(const ValueType& elem);
- queue_op_status try_push(BOOST_THREAD_RV_REF(ValueType) elem);
-
- ValueType pull();
-
- void pull(ValueType&);
-
- template <class WClock, class Duration>
- queue_op_status pull_until(const chrono::time_point<WClock,Duration>&, ValueType&);
- template <class Rep, class Period>
- queue_op_status pull_for(const chrono::duration<Rep,Period>&, ValueType&);
-
- queue_op_status try_pull(ValueType& elem);
- queue_op_status wait_pull(ValueType& elem);
- queue_op_status nonblocking_pull(ValueType&);
-
- private:
- void push(unique_lock<mutex>&, const ValueType& elem);
- void push(lock_guard<mutex>&, const ValueType& elem);
- void push(unique_lock<mutex>&, BOOST_THREAD_RV_REF(ValueType) elem);
- void push(lock_guard<mutex>&, BOOST_THREAD_RV_REF(ValueType) elem);
-
- queue_op_status try_push(unique_lock<mutex>&, const ValueType& elem);
- queue_op_status try_push(unique_lock<mutex>&, BOOST_THREAD_RV_REF(ValueType) elem);
-
- ValueType pull(unique_lock<mutex>&);
- ValueType pull(lock_guard<mutex>&);
-
- void pull(unique_lock<mutex>&, ValueType&);
- void pull(lock_guard<mutex>&, ValueType&);
-
- queue_op_status try_pull(lock_guard<mutex>& lk, ValueType& elem);
- queue_op_status try_pull(unique_lock<mutex>& lk, ValueType& elem);
-
- queue_op_status wait_pull(unique_lock<mutex>& lk, ValueType& elem);
-
- queue_op_status nonblocking_pull(unique_lock<mutex>& lk, ValueType&);
-
- sync_priority_queue(const sync_priority_queue&);
- sync_priority_queue& operator= (const sync_priority_queue&);
- sync_priority_queue(BOOST_THREAD_RV_REF(sync_priority_queue));
- sync_priority_queue& operator= (BOOST_THREAD_RV_REF(sync_priority_queue));
- }; //end class
-
-
- //////////////////////
- template <class T, class Container,class Cmp>
- void sync_priority_queue<T,Container,Cmp>::push(unique_lock<mutex>& lk, const T& elem)
- {
- super::throw_if_closed(lk);
- super::data_.push(elem);
- super::notify_not_empty_if_needed(lk);
- }
- template <class T, class Container,class Cmp>
- void sync_priority_queue<T,Container,Cmp>::push(lock_guard<mutex>& lk, const T& elem)
- {
- super::throw_if_closed(lk);
- super::data_.push(elem);
- super::notify_not_empty_if_needed(lk);
- }
- template <class T, class Container,class Cmp>
- void sync_priority_queue<T,Container,Cmp>::push(const T& elem)
- {
- lock_guard<mutex> lk(super::mtx_);
- push(lk, elem);
- }
-
- //////////////////////
- template <class T, class Container,class Cmp>
- void sync_priority_queue<T,Container,Cmp>::push(unique_lock<mutex>& lk, BOOST_THREAD_RV_REF(T) elem)
- {
- super::throw_if_closed(lk);
- super::data_.push(boost::move(elem));
- super::notify_not_empty_if_needed(lk);
- }
- template <class T, class Container,class Cmp>
- void sync_priority_queue<T,Container,Cmp>::push(lock_guard<mutex>& lk, BOOST_THREAD_RV_REF(T) elem)
- {
- super::throw_if_closed(lk);
- super::data_.push(boost::move(elem));
- super::notify_not_empty_if_needed(lk);
- }
- template <class T, class Container,class Cmp>
- void sync_priority_queue<T,Container,Cmp>::push(BOOST_THREAD_RV_REF(T) elem)
- {
- lock_guard<mutex> lk(super::mtx_);
- push(lk, boost::move(elem));
- }
-
- //////////////////////
- template <class T, class Container,class Cmp>
- queue_op_status sync_priority_queue<T,Container,Cmp>::try_push(const T& elem)
- {
- lock_guard<mutex> lk(super::mtx_);
- if (super::closed(lk)) return queue_op_status::closed;
- push(lk, elem);
- return queue_op_status::success;
- }
-
- //////////////////////
- template <class T, class Container,class Cmp>
- queue_op_status sync_priority_queue<T,Container,Cmp>::try_push(BOOST_THREAD_RV_REF(T) elem)
- {
- lock_guard<mutex> lk(super::mtx_);
- if (super::closed(lk)) return queue_op_status::closed;
- push(lk, boost::move(elem));
-
- return queue_op_status::success;
- }
-
- //////////////////////
- template <class T,class Container, class Cmp>
- T sync_priority_queue<T,Container,Cmp>::pull(unique_lock<mutex>&)
- {
- return super::data_.pull();
- }
- template <class T,class Container, class Cmp>
- T sync_priority_queue<T,Container,Cmp>::pull(lock_guard<mutex>&)
- {
- return super::data_.pull();
- }
-
- template <class T,class Container, class Cmp>
- T sync_priority_queue<T,Container,Cmp>::pull()
- {
- unique_lock<mutex> lk(super::mtx_);
- const bool has_been_closed = super::wait_until_not_empty_or_closed(lk);
- if (has_been_closed) super::throw_if_closed(lk);
- return pull(lk);
- }
-
- //////////////////////
- template <class T,class Container, class Cmp>
- void sync_priority_queue<T,Container,Cmp>::pull(unique_lock<mutex>&, T& elem)
- {
- elem = super::data_.pull();
- }
- template <class T,class Container, class Cmp>
- void sync_priority_queue<T,Container,Cmp>::pull(lock_guard<mutex>&, T& elem)
- {
- elem = super::data_.pull();
- }
-
- template <class T,class Container, class Cmp>
- void sync_priority_queue<T,Container,Cmp>::pull(T& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- const bool has_been_closed = super::wait_until_not_empty_or_closed(lk);
- if (has_been_closed) super::throw_if_closed(lk);
- pull(lk, elem);
- }
-
- //////////////////////
- template <class T, class Cont,class Cmp>
- template <class WClock, class Duration>
- queue_op_status
- sync_priority_queue<T,Cont,Cmp>::pull_until(const chrono::time_point<WClock,Duration>& tp, T& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- const queue_op_status rc = super::wait_until_not_empty_or_closed_until(lk, tp);
- if (rc == queue_op_status::success) pull(lk, elem);
- return rc;
- }
-
- //////////////////////
- template <class T, class Cont,class Cmp>
- template <class Rep, class Period>
- queue_op_status
- sync_priority_queue<T,Cont,Cmp>::pull_for(const chrono::duration<Rep,Period>& dura, T& elem)
- {
- return pull_until(chrono::steady_clock::now() + dura, elem);
- }
-
- //////////////////////
- template <class T, class Container,class Cmp>
- queue_op_status
- sync_priority_queue<T,Container,Cmp>::try_pull(unique_lock<mutex>& lk, T& elem)
- {
- if (super::empty(lk))
- {
- if (super::closed(lk)) return queue_op_status::closed;
- return queue_op_status::empty;
- }
- pull(lk, elem);
- return queue_op_status::success;
- }
-
- template <class T, class Container,class Cmp>
- queue_op_status
- sync_priority_queue<T,Container,Cmp>::try_pull(lock_guard<mutex>& lk, T& elem)
- {
- if (super::empty(lk))
- {
- if (super::closed(lk)) return queue_op_status::closed;
- return queue_op_status::empty;
- }
- pull(lk, elem);
- return queue_op_status::success;
- }
-
- template <class T, class Container,class Cmp>
- queue_op_status
- sync_priority_queue<T,Container,Cmp>::try_pull(T& elem)
- {
- lock_guard<mutex> lk(super::mtx_);
- return try_pull(lk, elem);
- }
-
- //////////////////////
- template <class T,class Container, class Cmp>
- queue_op_status sync_priority_queue<T,Container,Cmp>::wait_pull(unique_lock<mutex>& lk, T& elem)
- {
- const bool has_been_closed = super::wait_until_not_empty_or_closed(lk);
- if (has_been_closed) return queue_op_status::closed;
- pull(lk, elem);
- return queue_op_status::success;
- }
-
- template <class T,class Container, class Cmp>
- queue_op_status sync_priority_queue<T,Container,Cmp>::wait_pull(T& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return wait_pull(lk, elem);
- }
-
- //////////////////////
- template <class T,class Container, class Cmp>
- queue_op_status sync_priority_queue<T,Container,Cmp>::nonblocking_pull(T& elem)
- {
- unique_lock<mutex> lk(super::mtx_, try_to_lock);
- if (!lk.owns_lock()) return queue_op_status::busy;
- return try_pull(lk, elem);
- }
-
-
-
-} //end concurrent namespace
-
-using concurrent::sync_priority_queue;
-
-} //end boost namespace
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/sync_queue.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/sync_queue.hpp
deleted file mode 100644
index b36b57e607..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/sync_queue.hpp
+++ /dev/null
@@ -1,325 +0,0 @@
-#ifndef BOOST_THREAD_CONCURRENT_QUEUES_SYNC_QUEUE_HPP
-#define BOOST_THREAD_CONCURRENT_QUEUES_SYNC_QUEUE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2013-2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/concurrent_queues/detail/sync_queue_base.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <boost/thread/csbl/devector.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/mutex.hpp>
-
-#include <boost/throw_exception.hpp>
-#include <boost/smart_ptr/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
- template <class ValueType, class Container = csbl::devector<ValueType> >
- class sync_queue
- : public detail::sync_queue_base<ValueType, Container >
- {
- typedef detail::sync_queue_base<ValueType, Container > super;
-
- public:
- typedef ValueType value_type;
- //typedef typename super::value_type value_type; // fixme
- typedef typename super::underlying_queue_type underlying_queue_type;
- typedef typename super::size_type size_type;
- typedef typename super::op_status op_status;
-
- // Constructors/Assignment/Destructors
- BOOST_THREAD_NO_COPYABLE(sync_queue)
- inline sync_queue();
- //template <class Range>
- //inline explicit sync_queue(Range range);
- inline ~sync_queue();
-
- // Modifiers
- inline void push(const value_type& x);
- inline queue_op_status try_push(const value_type& x);
- inline queue_op_status nonblocking_push(const value_type& x);
- inline queue_op_status wait_push(const value_type& x);
- inline void push(BOOST_THREAD_RV_REF(value_type) x);
- inline queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x);
- inline queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x);
- inline queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x);
-
- // Observers/Modifiers
- inline void pull(value_type&);
- // enable_if is_nothrow_copy_movable<value_type>
- inline value_type pull();
-
- inline queue_op_status try_pull(value_type&);
- inline queue_op_status nonblocking_pull(value_type&);
- inline queue_op_status wait_pull(ValueType& elem);
-
- private:
-
- inline queue_op_status try_pull(value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status wait_pull(value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status try_push(const value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status wait_push(const value_type& x, unique_lock<mutex>& lk);
- inline queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x, unique_lock<mutex>& lk);
- inline queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x, unique_lock<mutex>& lk);
-
- inline void pull(value_type& elem, unique_lock<mutex>& )
- {
- elem = boost::move(super::data_.front());
- super::data_.pop_front();
- }
- inline value_type pull(unique_lock<mutex>& )
- {
- value_type e = boost::move(super::data_.front());
- super::data_.pop_front();
- return boost::move(e);
- }
-
- inline void push(const value_type& elem, unique_lock<mutex>& lk)
- {
- super::data_.push_back(elem);
- super::notify_not_empty_if_needed(lk);
- }
-
- inline void push(BOOST_THREAD_RV_REF(value_type) elem, unique_lock<mutex>& lk)
- {
- super::data_.push_back(boost::move(elem));
- super::notify_not_empty_if_needed(lk);
- }
- };
-
- template <class ValueType, class Container>
- sync_queue<ValueType, Container>::sync_queue() :
- super()
- {
- }
-
-// template <class ValueType, class Container>
-// template <class Range>
-// explicit sync_queue<ValueType, Container>::sync_queue(Range range) :
-// data_(), closed_(false)
-// {
-// try
-// {
-// typedef typename Range::iterator iterator_t;
-// iterator_t first = boost::begin(range);
-// iterator_t end = boost::end(range);
-// for (iterator_t cur = first; cur != end; ++cur)
-// {
-// data_.push(boost::move(*cur));;
-// }
-// notify_not_empty_if_needed(lk);
-// }
-// catch (...)
-// {
-// delete[] data_;
-// }
-// }
-
- template <class ValueType, class Container>
- sync_queue<ValueType, Container>::~sync_queue()
- {
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::try_pull(ValueType& elem, unique_lock<mutex>& lk)
- {
- if (super::empty(lk))
- {
- if (super::closed(lk)) return queue_op_status::closed;
- return queue_op_status::empty;
- }
- pull(elem, lk);
- return queue_op_status::success;
- }
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::wait_pull(ValueType& elem, unique_lock<mutex>& lk)
- {
- const bool has_been_closed = super::wait_until_not_empty_or_closed(lk);
- if (has_been_closed) return queue_op_status::closed;
- pull(elem, lk);
- return queue_op_status::success;
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::try_pull(ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return try_pull(elem, lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::wait_pull(ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return wait_pull(elem, lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::nonblocking_pull(ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_, try_to_lock);
- if (!lk.owns_lock())
- {
- return queue_op_status::busy;
- }
- return try_pull(elem, lk);
- }
-
- template <class ValueType, class Container>
- void sync_queue<ValueType, Container>::pull(ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- const bool has_been_closed = super::wait_until_not_empty_or_closed(lk);
- if (has_been_closed) super::throw_if_closed(lk);
- pull(elem, lk);
- }
-
- // enable if ValueType is nothrow movable
- template <class ValueType, class Container>
- ValueType sync_queue<ValueType, Container>::pull()
- {
- unique_lock<mutex> lk(super::mtx_);
- const bool has_been_closed = super::wait_until_not_empty_or_closed(lk);
- if (has_been_closed) super::throw_if_closed(lk);
- return pull(lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::try_push(const ValueType& elem, unique_lock<mutex>& lk)
- {
- if (super::closed(lk)) return queue_op_status::closed;
- push(elem, lk);
- return queue_op_status::success;
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::try_push(const ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return try_push(elem, lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::wait_push(const ValueType& elem, unique_lock<mutex>& lk)
- {
- if (super::closed(lk)) return queue_op_status::closed;
- push(elem, lk);
- return queue_op_status::success;
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::wait_push(const ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return wait_push(elem, lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::nonblocking_push(const ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_, try_to_lock);
- if (!lk.owns_lock()) return queue_op_status::busy;
- return try_push(elem, lk);
- }
-
- template <class ValueType, class Container>
- void sync_queue<ValueType, Container>::push(const ValueType& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- super::throw_if_closed(lk);
- push(elem, lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::try_push(BOOST_THREAD_RV_REF(ValueType) elem, unique_lock<mutex>& lk)
- {
- if (super::closed(lk)) return queue_op_status::closed;
- push(boost::move(elem), lk);
- return queue_op_status::success;
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::try_push(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return try_push(boost::move(elem), lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::wait_push(BOOST_THREAD_RV_REF(ValueType) elem, unique_lock<mutex>& lk)
- {
- if (super::closed(lk)) return queue_op_status::closed;
- push(boost::move(elem), lk);
- return queue_op_status::success;
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::wait_push(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return wait_push(boost::move(elem), lk);
- }
-
- template <class ValueType, class Container>
- queue_op_status sync_queue<ValueType, Container>::nonblocking_push(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(super::mtx_, try_to_lock);
- if (!lk.owns_lock())
- {
- return queue_op_status::busy;
- }
- return try_push(boost::move(elem), lk);
- }
-
- template <class ValueType, class Container>
- void sync_queue<ValueType, Container>::push(BOOST_THREAD_RV_REF(ValueType) elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- super::throw_if_closed(lk);
- push(boost::move(elem), lk);
- }
-
- template <class ValueType, class Container>
- sync_queue<ValueType, Container>& operator<<(sync_queue<ValueType, Container>& sbq, BOOST_THREAD_RV_REF(ValueType) elem)
- {
- sbq.push(boost::move(elem));
- return sbq;
- }
-
- template <class ValueType, class Container>
- sync_queue<ValueType, Container>& operator<<(sync_queue<ValueType, Container>& sbq, ValueType const&elem)
- {
- sbq.push(elem);
- return sbq;
- }
-
- template <class ValueType, class Container>
- sync_queue<ValueType, Container>& operator>>(sync_queue<ValueType, Container>& sbq, ValueType &elem)
- {
- sbq.pull(elem);
- return sbq;
- }
-
-}
-using concurrent::sync_queue;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/concurrent_queues/sync_timed_queue.hpp b/contrib/restricted/boost/boost/thread/concurrent_queues/sync_timed_queue.hpp
deleted file mode 100644
index a4394c0729..0000000000
--- a/contrib/restricted/boost/boost/thread/concurrent_queues/sync_timed_queue.hpp
+++ /dev/null
@@ -1,403 +0,0 @@
-// Copyright (C) 2014 Ian Forbed
-// Copyright (C) 2014-2017 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)
-//
-
-#ifndef BOOST_THREAD_SYNC_TIMED_QUEUE_HPP
-#define BOOST_THREAD_SYNC_TIMED_QUEUE_HPP
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/thread/concurrent_queues/sync_priority_queue.hpp>
-#include <boost/chrono/duration.hpp>
-#include <boost/chrono/time_point.hpp>
-#include <boost/chrono/system_clocks.hpp>
-#include <boost/chrono/chrono_io.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace concurrent
-{
-namespace detail
-{
- // fixme: shouldn't the timepoint be configurable
- template <class T, class Clock = chrono::steady_clock, class TimePoint=typename Clock::time_point>
- struct scheduled_type
- {
- typedef T value_type;
- typedef Clock clock;
- typedef TimePoint time_point;
- T data;
- time_point time;
-
- BOOST_THREAD_COPYABLE_AND_MOVABLE(scheduled_type)
-
- scheduled_type(T const& pdata, time_point tp) : data(pdata), time(tp) {}
- scheduled_type(BOOST_THREAD_RV_REF(T) pdata, time_point tp) : data(boost::move(pdata)), time(tp) {}
-
- scheduled_type(scheduled_type const& other) : data(other.data), time(other.time) {}
- scheduled_type& operator=(BOOST_THREAD_COPY_ASSIGN_REF(scheduled_type) other) {
- data = other.data;
- time = other.time;
- return *this;
- }
-
- scheduled_type(BOOST_THREAD_RV_REF(scheduled_type) other) : data(boost::move(other.data)), time(other.time) {}
- scheduled_type& operator=(BOOST_THREAD_RV_REF(scheduled_type) other) {
- data = boost::move(other.data);
- time = other.time;
- return *this;
- }
-
- bool operator <(const scheduled_type & other) const
- {
- return this->time > other.time;
- }
- }; //end struct
-
-} //end detail namespace
-
- template <class T, class Clock = chrono::steady_clock, class TimePoint=typename Clock::time_point>
- class sync_timed_queue
- : private sync_priority_queue<detail::scheduled_type<T, Clock, TimePoint> >
- {
- typedef detail::scheduled_type<T, Clock, TimePoint> stype;
- typedef sync_priority_queue<stype> super;
- public:
- typedef T value_type;
- typedef Clock clock;
- typedef typename clock::duration duration;
- typedef typename clock::time_point time_point;
- typedef typename super::underlying_queue_type underlying_queue_type;
- typedef typename super::size_type size_type;
- typedef typename super::op_status op_status;
-
- sync_timed_queue() : super() {};
- ~sync_timed_queue() {}
-
- using super::size;
- using super::empty;
- using super::full;
- using super::close;
- using super::closed;
-
- T pull();
- void pull(T& elem);
-
- template <class WClock, class Duration>
- queue_op_status pull_until(chrono::time_point<WClock,Duration> const& tp, T& elem);
- template <class Rep, class Period>
- queue_op_status pull_for(chrono::duration<Rep,Period> const& dura, T& elem);
-
- queue_op_status try_pull(T& elem);
- queue_op_status wait_pull(T& elem);
- queue_op_status nonblocking_pull(T& elem);
-
- template <class Duration>
- void push(const T& elem, chrono::time_point<clock,Duration> const& tp);
- template <class Rep, class Period>
- void push(const T& elem, chrono::duration<Rep,Period> const& dura);
-
- template <class Duration>
- void push(BOOST_THREAD_RV_REF(T) elem, chrono::time_point<clock,Duration> const& tp);
- template <class Rep, class Period>
- void push(BOOST_THREAD_RV_REF(T) elem, chrono::duration<Rep,Period> const& dura);
-
- template <class Duration>
- queue_op_status try_push(const T& elem, chrono::time_point<clock,Duration> const& tp);
- template <class Rep, class Period>
- queue_op_status try_push(const T& elem, chrono::duration<Rep,Period> const& dura);
-
- template <class Duration>
- queue_op_status try_push(BOOST_THREAD_RV_REF(T) elem, chrono::time_point<clock,Duration> const& tp);
- template <class Rep, class Period>
- queue_op_status try_push(BOOST_THREAD_RV_REF(T) elem, chrono::duration<Rep,Period> const& dura);
-
- private:
- inline bool not_empty_and_time_reached(unique_lock<mutex>& lk) const;
- inline bool not_empty_and_time_reached(lock_guard<mutex>& lk) const;
-
- bool wait_to_pull(unique_lock<mutex>&);
- template <class WClock, class Duration>
- queue_op_status wait_to_pull_until(unique_lock<mutex>&, chrono::time_point<WClock, Duration> const& tp);
-
- T pull(unique_lock<mutex>&);
- T pull(lock_guard<mutex>&);
-
- void pull(unique_lock<mutex>&, T& elem);
- void pull(lock_guard<mutex>&, T& elem);
-
- queue_op_status try_pull(unique_lock<mutex>&, T& elem);
- queue_op_status try_pull(lock_guard<mutex>&, T& elem);
-
- queue_op_status wait_pull(unique_lock<mutex>& lk, T& elem);
-
- sync_timed_queue(const sync_timed_queue&);
- sync_timed_queue& operator=(const sync_timed_queue&);
- sync_timed_queue(BOOST_THREAD_RV_REF(sync_timed_queue));
- sync_timed_queue& operator=(BOOST_THREAD_RV_REF(sync_timed_queue));
- }; //end class
-
-
- template <class T, class Clock, class TimePoint>
- template <class Duration>
- void sync_timed_queue<T, Clock, TimePoint>::push(const T& elem, chrono::time_point<clock,Duration> const& tp)
- {
- super::push(stype(elem,tp));
- }
-
- template <class T, class Clock, class TimePoint>
- template <class Rep, class Period>
- void sync_timed_queue<T, Clock, TimePoint>::push(const T& elem, chrono::duration<Rep,Period> const& dura)
- {
- push(elem, clock::now() + dura);
- }
-
- template <class T, class Clock, class TimePoint>
- template <class Duration>
- void sync_timed_queue<T, Clock, TimePoint>::push(BOOST_THREAD_RV_REF(T) elem, chrono::time_point<clock,Duration> const& tp)
- {
- super::push(stype(boost::move(elem),tp));
- }
-
- template <class T, class Clock, class TimePoint>
- template <class Rep, class Period>
- void sync_timed_queue<T, Clock, TimePoint>::push(BOOST_THREAD_RV_REF(T) elem, chrono::duration<Rep,Period> const& dura)
- {
- push(boost::move(elem), clock::now() + dura);
- }
-
-
-
- template <class T, class Clock, class TimePoint>
- template <class Duration>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::try_push(const T& elem, chrono::time_point<clock,Duration> const& tp)
- {
- return super::try_push(stype(elem,tp));
- }
-
- template <class T, class Clock, class TimePoint>
- template <class Rep, class Period>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::try_push(const T& elem, chrono::duration<Rep,Period> const& dura)
- {
- return try_push(elem,clock::now() + dura);
- }
-
- template <class T, class Clock, class TimePoint>
- template <class Duration>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::try_push(BOOST_THREAD_RV_REF(T) elem, chrono::time_point<clock,Duration> const& tp)
- {
- return super::try_push(stype(boost::move(elem), tp));
- }
-
- template <class T, class Clock, class TimePoint>
- template <class Rep, class Period>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::try_push(BOOST_THREAD_RV_REF(T) elem, chrono::duration<Rep,Period> const& dura)
- {
- return try_push(boost::move(elem), clock::now() + dura);
- }
-
- ///////////////////////////
- template <class T, class Clock, class TimePoint>
- bool sync_timed_queue<T, Clock, TimePoint>::not_empty_and_time_reached(unique_lock<mutex>& lk) const
- {
- return ! super::empty(lk) && clock::now() >= super::data_.top().time;
- }
-
- template <class T, class Clock, class TimePoint>
- bool sync_timed_queue<T, Clock, TimePoint>::not_empty_and_time_reached(lock_guard<mutex>& lk) const
- {
- return ! super::empty(lk) && clock::now() >= super::data_.top().time;
- }
-
- ///////////////////////////
- template <class T, class Clock, class TimePoint>
- bool sync_timed_queue<T, Clock, TimePoint>::wait_to_pull(unique_lock<mutex>& lk)
- {
- for (;;)
- {
- if (not_empty_and_time_reached(lk)) return false; // success
- if (super::closed(lk)) return true; // closed
-
- super::wait_until_not_empty_or_closed(lk);
-
- if (not_empty_and_time_reached(lk)) return false; // success
- if (super::closed(lk)) return true; // closed
-
- const time_point tp(super::data_.top().time);
- super::wait_until_closed_until(lk, tp);
- }
- }
-
- template <class T, class Clock, class TimePoint>
- template <class WClock, class Duration>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::wait_to_pull_until(unique_lock<mutex>& lk, chrono::time_point<WClock, Duration> const& tp)
- {
- for (;;)
- {
- if (not_empty_and_time_reached(lk)) return queue_op_status::success;
- if (super::closed(lk)) return queue_op_status::closed;
- if (clock::now() >= tp) return super::empty(lk) ? queue_op_status::timeout : queue_op_status::not_ready;
-
- super::wait_until_not_empty_or_closed_until(lk, tp);
-
- if (not_empty_and_time_reached(lk)) return queue_op_status::success;
- if (super::closed(lk)) return queue_op_status::closed;
- if (clock::now() >= tp) return super::empty(lk) ? queue_op_status::timeout : queue_op_status::not_ready;
-
- const time_point tpmin(tp < super::data_.top().time ? tp : super::data_.top().time);
- super::wait_until_closed_until(lk, tpmin);
- }
- }
-
- ///////////////////////////
- template <class T, class Clock, class TimePoint>
- T sync_timed_queue<T, Clock, TimePoint>::pull(unique_lock<mutex>&)
- {
-#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
- return boost::move(super::data_.pull().data);
-#else
- return super::data_.pull().data;
-#endif
- }
-
- template <class T, class Clock, class TimePoint>
- T sync_timed_queue<T, Clock, TimePoint>::pull(lock_guard<mutex>&)
- {
-#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
- return boost::move(super::data_.pull().data);
-#else
- return super::data_.pull().data;
-#endif
- }
- template <class T, class Clock, class TimePoint>
- T sync_timed_queue<T, Clock, TimePoint>::pull()
- {
- unique_lock<mutex> lk(super::mtx_);
- const bool has_been_closed = wait_to_pull(lk);
- if (has_been_closed) super::throw_if_closed(lk);
- return pull(lk);
- }
-
- ///////////////////////////
- template <class T, class Clock, class TimePoint>
- void sync_timed_queue<T, Clock, TimePoint>::pull(unique_lock<mutex>&, T& elem)
- {
-#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
- elem = boost::move(super::data_.pull().data);
-#else
- elem = super::data_.pull().data;
-#endif
- }
-
- template <class T, class Clock, class TimePoint>
- void sync_timed_queue<T, Clock, TimePoint>::pull(lock_guard<mutex>&, T& elem)
- {
-#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
- elem = boost::move(super::data_.pull().data);
-#else
- elem = super::data_.pull().data;
-#endif
- }
-
- template <class T, class Clock, class TimePoint>
- void sync_timed_queue<T, Clock, TimePoint>::pull(T& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- const bool has_been_closed = wait_to_pull(lk);
- if (has_been_closed) super::throw_if_closed(lk);
- pull(lk, elem);
- }
-
- //////////////////////
- template <class T, class Clock, class TimePoint>
- template <class WClock, class Duration>
- queue_op_status
- sync_timed_queue<T, Clock, TimePoint>::pull_until(chrono::time_point<WClock, Duration> const& tp, T& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- const queue_op_status rc = wait_to_pull_until(lk, tp);
- if (rc == queue_op_status::success) pull(lk, elem);
- return rc;
- }
-
- //////////////////////
- template <class T, class Clock, class TimePoint>
- template <class Rep, class Period>
- queue_op_status
- sync_timed_queue<T, Clock, TimePoint>::pull_for(chrono::duration<Rep,Period> const& dura, T& elem)
- {
- return pull_until(chrono::steady_clock::now() + dura, elem);
- }
-
- ///////////////////////////
- template <class T, class Clock, class TimePoint>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::try_pull(unique_lock<mutex>& lk, T& elem)
- {
- if (not_empty_and_time_reached(lk))
- {
- pull(lk, elem);
- return queue_op_status::success;
- }
- if (super::closed(lk)) return queue_op_status::closed;
- if (super::empty(lk)) return queue_op_status::empty;
- return queue_op_status::not_ready;
- }
- template <class T, class Clock, class TimePoint>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::try_pull(lock_guard<mutex>& lk, T& elem)
- {
- if (not_empty_and_time_reached(lk))
- {
- pull(lk, elem);
- return queue_op_status::success;
- }
- if (super::closed(lk)) return queue_op_status::closed;
- if (super::empty(lk)) return queue_op_status::empty;
- return queue_op_status::not_ready;
- }
-
- template <class T, class Clock, class TimePoint>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::try_pull(T& elem)
- {
- lock_guard<mutex> lk(super::mtx_);
- return try_pull(lk, elem);
- }
-
- ///////////////////////////
- template <class T, class Clock, class TimePoint>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::wait_pull(unique_lock<mutex>& lk, T& elem)
- {
- const bool has_been_closed = wait_to_pull(lk);
- if (has_been_closed) return queue_op_status::closed;
- pull(lk, elem);
- return queue_op_status::success;
- }
-
- template <class T, class Clock, class TimePoint>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::wait_pull(T& elem)
- {
- unique_lock<mutex> lk(super::mtx_);
- return wait_pull(lk, elem);
- }
-
- ///////////////////////////
- template <class T, class Clock, class TimePoint>
- queue_op_status sync_timed_queue<T, Clock, TimePoint>::nonblocking_pull(T& elem)
- {
- unique_lock<mutex> lk(super::mtx_, try_to_lock);
- if (! lk.owns_lock()) return queue_op_status::busy;
- return try_pull(lk, elem);
- }
-
-} //end concurrent namespace
-
-using concurrent::sync_timed_queue;
-
-} //end boost namespace
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/condition.hpp b/contrib/restricted/boost/boost/thread/condition.hpp
deleted file mode 100644
index 9567df9825..0000000000
--- a/contrib/restricted/boost/boost/thread/condition.hpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef BOOST_THREAD_CONDITION_HPP
-#define BOOST_THREAD_CONDITION_HPP
-// (C) Copyright 2007 Anthony Williams
-//
-// 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)
-
-#include <boost/thread/detail/config.hpp>
-
-#if defined BOOST_THREAD_PROVIDES_CONDITION
-
-#include <boost/thread/condition_variable.hpp>
-
-namespace boost
-{
- typedef condition_variable_any condition;
-}
-
-#endif
-#endif
diff --git a/contrib/restricted/boost/boost/thread/csbl/deque.hpp b/contrib/restricted/boost/boost/thread/csbl/deque.hpp
deleted file mode 100644
index 2b26a46e1a..0000000000
--- a/contrib/restricted/boost/boost/thread/csbl/deque.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (C) 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)
-//
-// 2013/10 Vicente J. Botet Escriba
-// Creation.
-
-#ifndef BOOST_CSBL_DEQUE_HPP
-#define BOOST_CSBL_DEQUE_HPP
-
-#include <boost/config.hpp>
-// MSVC has some trouble instantiating a non_copyable type
-//C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\xmemory0(606) : error C2248: 'non_copyable::non_copyable' : cannot access private member declared in class 'non_copyable'
-// ..\libs\thread\test\sync\mutual_exclusion\queue_views\single_thread_pass.cpp(24) : see declaration of 'non_copyable::non_copyable'
-// ..\libs\thread\test\sync\mutual_exclusion\queue_views\single_thread_pass.cpp(23) : see declaration of 'non_copyable'
-// C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\xmemory0(605) : while compiling class template member function 'void std::allocator<_Ty>::construct(_Ty *,const _Ty &)'
-// with
-// [
-// _Ty=non_copyable
-// ]
-#if defined BOOST_THREAD_USES_BOOST_DEQUE || defined BOOST_NO_CXX11_RVALUE_REFERENCES || (defined _MSC_VER && _MSC_FULL_VER < 180020827)
-#ifndef BOOST_THREAD_USES_BOOST_DEQUE
-#define BOOST_THREAD_USES_BOOST_DEQUE
-#endif
-#include <boost/container/deque.hpp>
-#else
-#include <deque>
-#endif
-
-namespace boost
-{
- namespace csbl
- {
-#if defined BOOST_THREAD_USES_BOOST_DEQUE
- using ::boost::container::deque;
-
-#else
- using ::std::deque;
-
-#endif
-
- }
-}
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/csbl/devector.hpp b/contrib/restricted/boost/boost/thread/csbl/devector.hpp
deleted file mode 100644
index c2bc0bbe99..0000000000
--- a/contrib/restricted/boost/boost/thread/csbl/devector.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (C) 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)
-//
-// 2013/10 Vicente J. Botet Escriba
-// Creation.
-
-#ifndef BOOST_CSBL_DEVECTOR_HPP
-#define BOOST_CSBL_DEVECTOR_HPP
-
-#include <boost/config.hpp>
-
-#include <boost/thread/csbl/vector.hpp>
-#include <boost/move/detail/move_helpers.hpp>
-
-namespace boost
-{
- namespace csbl
- {
- template <class T>
- class devector
- {
- typedef csbl::vector<T> vector_type;
- vector_type data_;
- std::size_t front_index_;
-
- BOOST_COPYABLE_AND_MOVABLE(devector)
-
- template <class U>
- void priv_push_back(BOOST_FWD_REF(U) x)
- { data_.push_back(boost::forward<U>(x)); }
-
- public:
- typedef typename vector_type::size_type size_type;
- typedef typename vector_type::reference reference;
- typedef typename vector_type::const_reference const_reference;
-
-
- devector() : front_index_(0) {}
- devector(devector const& x) BOOST_NOEXCEPT
- : data_(x.data_),
- front_index_(x.front_index_)
- {}
- devector(BOOST_RV_REF(devector) x) BOOST_NOEXCEPT
- : data_(boost::move(x.data_)),
- front_index_(x.front_index_)
- {}
-
- devector& operator=(BOOST_COPY_ASSIGN_REF(devector) x)
- {
- if (&x != this)
- {
- data_ = x.data_;
- front_index_ = x.front_index_;
- }
- return *this;
- }
-
- devector& operator=(BOOST_RV_REF(devector) x)
-#if defined BOOST_THREAD_USES_BOOST_VECTOR
- BOOST_NOEXCEPT_IF(vector_type::allocator_traits_type::propagate_on_container_move_assignment::value)
-#endif
- {
- data_ = boost::move(x.data_);
- front_index_ = x.front_index_;
- return *this;
- }
-
- bool empty() const BOOST_NOEXCEPT
- { return data_.size() == front_index_; }
-
- size_type size() const BOOST_NOEXCEPT
- { return data_.size() - front_index_; }
-
- reference front() BOOST_NOEXCEPT
- { return data_[front_index_]; }
-
- const_reference front() const BOOST_NOEXCEPT
- { return data_[front_index_]; }
-
- reference back() BOOST_NOEXCEPT
- { return data_.back(); }
-
- const_reference back() const BOOST_NOEXCEPT
- { return data_.back(); }
-
- BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
-
- void pop_front()
- {
- ++front_index_;
- if (empty()) {
- data_.clear();
- front_index_=0;
- }
- }
-
- };
- }
-}
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/csbl/list.hpp b/contrib/restricted/boost/boost/thread/csbl/list.hpp
deleted file mode 100644
index 52ff45d349..0000000000
--- a/contrib/restricted/boost/boost/thread/csbl/list.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (C) 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)
-//
-// 2013/10 Vicente J. Botet Escriba
-// Creation.
-
-#ifndef BOOST_CSBL_LIST_HPP
-#define BOOST_CSBL_LIST_HPP
-
-#include <boost/config.hpp>
-
-#if defined BOOST_THREAD_USES_BOOST_LIST || defined BOOST_NO_CXX11_RVALUE_REFERENCES
-#ifndef BOOST_THREAD_USES_BOOST_LIST
-#define BOOST_THREAD_USES_BOOST_LIST
-#endif
-#include <boost/container/list.hpp>
-#else
-#include <list>
-#endif
-
-namespace boost
-{
- namespace csbl
- {
-#if defined BOOST_THREAD_USES_BOOST_LIST
- using ::boost::container::list;
-#else
- using ::std::list;
-#endif
-
- }
-}
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/csbl/memory.hpp b/contrib/restricted/boost/boost/thread/csbl/memory.hpp
deleted file mode 100644
index e076f11ad3..0000000000
--- a/contrib/restricted/boost/boost/thread/csbl/memory.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (C) 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)
-//
-// 2013/10 Vicente J. Botet Escriba
-// Creation.
-
-#ifndef BOOST_CSBL_MEMORY_HPP
-#define BOOST_CSBL_MEMORY_HPP
-
-// 20.7.2 Header <memory> synopsis
-
-// 20.7.3, pointer traits
-#include <boost/thread/csbl/memory/pointer_traits.hpp>
-
-// 20.7.4, pointer safety
-// 20.7.5, pointer alignment function
-
-// 20.7.6, allocator argument tag
-#include <boost/thread/csbl/memory/allocator_arg.hpp>
-
-// 20.7.8, allocator traits
-#include <boost/thread/csbl/memory/allocator_traits.hpp>
-
-// 20.7.7, uses_allocator
-#include <boost/thread/csbl/memory/scoped_allocator.hpp>
-
-// 20.7.9, the default allocator:
-namespace boost
-{
- namespace csbl
- {
- using ::std::allocator;
- }
-}
-// 20.7.10, raw storage iterator:
-// 20.7.11, temporary buffers:
-// 20.7.12, specialized algorithms:
-
-// 20.8.1 class template unique_ptr:
-// default_delete
-#include <boost/thread/csbl/memory/default_delete.hpp>
-#include <boost/thread/csbl/memory/unique_ptr.hpp>
-
-// 20.8.2.1, class bad_weak_ptr:
-// 20.8.2.2, class template shared_ptr:
-// 20.8.2.2.6, shared_ptr creation
-// 20.8.2.2.7, shared_ptr comparisons:
-// 20.8.2.2.8, shared_ptr specialized algorithms:
-// 20.8.2.2.9, shared_ptr casts:
-// 20.8.2.2.10, shared_ptr get_deleter:
-// 20.8.2.2.11, shared_ptr I/O:
-// 20.8.2.3, class template weak_ptr:
-// 20.8.2.3.6, weak_ptr specialized algorithms:
-// 20.8.2.3.7, class template owner_less:
-// 20.8.2.4, class template enable_shared_from_this:
-// 20.8.2.5, shared_ptr atomic access:
-// 20.8.2.6 hash support
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/csbl/memory/default_delete.hpp b/contrib/restricted/boost/boost/thread/csbl/memory/default_delete.hpp
deleted file mode 100644
index d20153b309..0000000000
--- a/contrib/restricted/boost/boost/thread/csbl/memory/default_delete.hpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (C) 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)
-//
-// 2013/10 Vicente J. Botet Escriba
-// Creation.
-
-#ifndef BOOST_CSBL_MEMORY_DEFAULT_DELETE_HPP
-#define BOOST_CSBL_MEMORY_DEFAULT_DELETE_HPP
-
-#include <boost/thread/csbl/memory/config.hpp>
-
-// 20.8.1 class template unique_ptr:
-// default_delete
-
-#if defined BOOST_NO_CXX11_SMART_PTR
-#include <boost/move/unique_ptr.hpp>
-
-namespace boost
-{
- namespace csbl
- {
- using ::boost::movelib::default_delete;
- }
-}
-#else
-namespace boost
-{
- namespace csbl
- {
- using ::std::default_delete;
- }
-}
-#endif // defined BOOST_NO_CXX11_SMART_PTR
-
-namespace boost
-{
- using ::boost::csbl::default_delete;
-}
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/csbl/queue.hpp b/contrib/restricted/boost/boost/thread/csbl/queue.hpp
deleted file mode 100644
index 1aa645d18f..0000000000
--- a/contrib/restricted/boost/boost/thread/csbl/queue.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (C) 2015 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)
-//
-// 2013/10 Vicente J. Botet Escriba
-// Creation.
-
-#ifndef BOOST_CSBL_QUEUE_HPP
-#define BOOST_CSBL_QUEUE_HPP
-
-#include <boost/config.hpp>
-// MSVC has some trouble instantiating a non_copyable type
-//C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\xmemory0(606) : error C2248: 'non_copyable::non_copyable' : cannot access private member declared in class 'non_copyable'
-// ..\libs\thread\test\sync\mutual_exclusion\queue_views\single_thread_pass.cpp(24) : see declaration of 'non_copyable::non_copyable'
-// ..\libs\thread\test\sync\mutual_exclusion\queue_views\single_thread_pass.cpp(23) : see declaration of 'non_copyable'
-// C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\xmemory0(605) : while compiling class template member function 'void std::allocator<_Ty>::construct(_Ty *,const _Ty &)'
-// with
-// [
-// _Ty=non_copyable
-// ]
-#if defined BOOST_THREAD_USES_BOOST_QUEUE || defined BOOST_NO_CXX11_RVALUE_REFERENCES || (defined _MSC_VER && _MSC_FULL_VER < 180020827)
-#ifndef BOOST_THREAD_USES_BOOST_QUEUE
-#define BOOST_THREAD_USES_BOOST_QUEUE
-#endif
-#include <boost/container/queue.hpp>
-#else
-#include <queue>
-#endif
-
-namespace boost
-{
- namespace csbl
- {
-#if defined BOOST_THREAD_USES_BOOST_QUEUE
- using ::boost::container::queue;
-
-#else
- using ::std::queue;
-
-#endif
-
- }
-}
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/detail/counter.hpp b/contrib/restricted/boost/boost/thread/detail/counter.hpp
deleted file mode 100644
index 38e1597c57..0000000000
--- a/contrib/restricted/boost/boost/thread/detail/counter.hpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// 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)
-// (C) Copyright 2013 Vicente J. Botet Escriba
-
-#ifndef BOOST_THREAD_COUNTER_HPP
-#define BOOST_THREAD_COUNTER_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-
-//#include <boost/thread/mutex.hpp>
-//#include <boost/thread/lock_types.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <boost/chrono/duration.hpp>
-#include <boost/chrono/time_point.hpp>
-#include <boost/assert.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
- namespace detail {
- struct counter
- {
- condition_variable cond_;
- std::size_t value_;
-
- counter(std::size_t value)
- : value_(value)
- {
-
- }
- counter& operator=(counter const& rhs)
- {
- value_ = rhs.value_;
- return *this;
- }
- counter& operator=(std::size_t value)
- {
- value_ = value;
- return *this;
- }
-
- operator std::size_t() const
- {
- return value_;
- }
- operator std::size_t&()
- {
- return value_;
- }
-
- void inc_and_notify_all()
- {
- ++value_;
- cond_.notify_all();
- }
-
- void dec_and_notify_all()
- {
- --value_;
- cond_.notify_all();
- }
- void assign_and_notify_all(counter const& rhs)
- {
- value_ = rhs.value_;
- cond_.notify_all();
- }
- void assign_and_notify_all(std::size_t value)
- {
- value_ = value;
- cond_.notify_all();
- }
- };
- struct counter_is_not_zero
- {
- counter_is_not_zero(counter const& count) : count_(count) {}
- bool operator()() const { return count_ != 0; }
- counter const& count_;
- };
- struct counter_is_zero
- {
- counter_is_zero(counter const& count) : count_(count) {}
- bool operator()() const { return count_ == 0; }
- counter const& count_;
- };
- struct is_zero
- {
- is_zero(std::size_t& count) : count_(count) {}
- bool operator()() const { return count_ == 0; }
- std::size_t& count_;
- };
- struct not_equal
- {
- not_equal(std::size_t& x, std::size_t& y) : x_(x), y_(y) {}
- bool operator()() const { return x_ != y_; }
- std::size_t& x_;
- std::size_t& y_;
- };
- }
-} // namespace boost
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/detail/force_cast.hpp b/contrib/restricted/boost/boost/thread/detail/force_cast.hpp
deleted file mode 100644
index d5d15adc1a..0000000000
--- a/contrib/restricted/boost/boost/thread/detail/force_cast.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (C) 2001-2003
-// Mac Murrett
-//
-// 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 for most recent version including documentation.
-
-#ifndef BOOST_FORCE_CAST_MJM012402_HPP
-#define BOOST_FORCE_CAST_MJM012402_HPP
-
-#include <boost/thread/detail/config.hpp>
-
-namespace boost {
-namespace detail {
-namespace thread {
-
-// force_cast will convert anything to anything.
-
-// general case
-template<class Return_Type, class Argument_Type>
-inline Return_Type &force_cast(Argument_Type &rSrc)
-{
- return(*reinterpret_cast<Return_Type *>(&rSrc));
-}
-
-// specialization for const
-template<class Return_Type, class Argument_Type>
-inline const Return_Type &force_cast(const Argument_Type &rSrc)
-{
- return(*reinterpret_cast<const Return_Type *>(&rSrc));
-}
-
-} // namespace thread
-} // namespace detail
-} // namespace boost
-
-#endif // BOOST_FORCE_CAST_MJM012402_HPP
diff --git a/contrib/restricted/boost/boost/thread/detail/function_wrapper.hpp b/contrib/restricted/boost/boost/thread/detail/function_wrapper.hpp
deleted file mode 100644
index 355f726762..0000000000
--- a/contrib/restricted/boost/boost/thread/detail/function_wrapper.hpp
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (C) 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)
-//
-// 2013/09 Vicente J. Botet Escriba
-// Adapt to boost from CCIA C++11 implementation
-// Make use of Boost.Move
-
-#ifndef BOOST_THREAD_DETAIL_FUNCTION_WRAPPER_HPP
-#define BOOST_THREAD_DETAIL_FUNCTION_WRAPPER_HPP
-
-#include <boost/config.hpp>
-#include <boost/thread/detail/memory.hpp>
-#include <boost/thread/detail/move.hpp>
-
-#include <boost/thread/csbl/memory/unique_ptr.hpp>
-
-#include <memory>
-#include <functional>
-
-namespace boost
-{
- namespace detail
- {
- class function_wrapper
- {
- struct impl_base
- {
- virtual void call()=0;
- virtual ~impl_base()
- {
- }
- };
- typedef boost::csbl::unique_ptr<impl_base> impl_base_type;
- impl_base_type impl;
- template <typename F>
- struct impl_type: impl_base
- {
- F f;
- impl_type(F const &f_)
- : f(f_)
- {}
- impl_type(BOOST_THREAD_RV_REF(F) f_)
- : f(boost::move(f_))
- {}
-
- void call()
- {
- if (impl) f();
- }
- };
- public:
- BOOST_THREAD_MOVABLE_ONLY(function_wrapper)
-
-//#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
- template<typename F>
- function_wrapper(F const& f):
- impl(new impl_type<F>(f))
- {}
-//#endif
- template<typename F>
- function_wrapper(BOOST_THREAD_RV_REF(F) f):
- impl(new impl_type<F>(boost::forward<F>(f)))
- {}
- function_wrapper(BOOST_THREAD_RV_REF(function_wrapper) other) BOOST_NOEXCEPT :
- impl(other.impl)
- {
- other.impl = 0;
- }
- function_wrapper()
- : impl(0)
- {
- }
- ~function_wrapper()
- {
- }
-
- function_wrapper& operator=(BOOST_THREAD_RV_REF(function_wrapper) other) BOOST_NOEXCEPT
- {
- impl=other.impl;
- other.impl=0;
- return *this;
- }
-
- void operator()()
- { impl->call();}
-
- };
- }
-}
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/detail/log.hpp b/contrib/restricted/boost/boost/thread/detail/log.hpp
deleted file mode 100644
index d36b997233..0000000000
--- a/contrib/restricted/boost/boost/thread/detail/log.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2012 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)
-
-#ifndef BOOST_THREAD_DETAIL_LOG_HPP
-#define BOOST_THREAD_DETAIL_LOG_HPP
-
-#include <boost/thread/detail/config.hpp>
-#if defined BOOST_THREAD_USES_LOG
-#include <boost/thread/recursive_mutex.hpp>
-#include <boost/thread/lock_guard.hpp>
-#if defined BOOST_THREAD_USES_LOG_THREAD_ID
-#include <boost/thread/thread.hpp>
-#endif
-#include <iostream>
-
-namespace boost
-{
- namespace thread_detail
- {
- inline boost::recursive_mutex& terminal_mutex()
- {
- static boost::recursive_mutex mtx;
- return mtx;
- }
-
- }
-}
-#if defined BOOST_THREAD_USES_LOG_THREAD_ID
-
-#define BOOST_THREAD_LOG \
- { \
- boost::lock_guard<boost::recursive_mutex> _lk_(boost::thread_detail::terminal_mutex()); \
- std::cout << boost::this_thread::get_id() << " - "<<__FILE__<<"["<<__LINE__<<"] " <<std::dec
-#else
-
-#define BOOST_THREAD_LOG \
-{ \
- boost::lock_guard<boost::recursive_mutex> _lk_(boost::thread_detail::terminal_mutex()); \
- std::cout << __FILE__<<"["<<__LINE__<<"] " <<std::dec
-
-#endif
-#define BOOST_THREAD_END_LOG \
- std::dec << std::endl; \
- }
-
-#else
-
-namespace boost
-{
- namespace thread_detail
- {
- struct dummy_stream_t
- {
- };
-
- template <typename T>
- inline dummy_stream_t const& operator<<(dummy_stream_t const& os, T)
- {
- return os;
- }
-
- inline dummy_stream_t const& operator<<(dummy_stream_t const& os, dummy_stream_t const&)
- {
- return os;
- }
-
-
- BOOST_CONSTEXPR_OR_CONST dummy_stream_t dummy_stream = {};
-
- }
-}
-
-#ifdef BOOST_MSVC
-#define BOOST_THREAD_LOG \
- __pragma(warning(suppress:4127)) /* conditional expression is constant */ \
- if (true) {} else boost::thread_detail::dummy_stream
-#else
-#define BOOST_THREAD_LOG if (true) {} else boost::thread_detail::dummy_stream
-#endif
-#define BOOST_THREAD_END_LOG boost::thread_detail::dummy_stream
-
-#endif
-
-#define BOOST_THREAD_TRACE BOOST_THREAD_LOG << BOOST_THREAD_END_LOG
-
-
-#ifdef BOOST_MSVC
-#define BOOST_DETAIL_THREAD_LOG \
- __pragma(warning(suppress:4127)) /* conditional expression is constant */ \
- if (false) {} else std::cout << std::endl << __FILE__ << "[" << __LINE__ << "]"
-#else
-#define BOOST_DETAIL_THREAD_LOG \
- if (false) {} else std::cout << std::endl << __FILE__ << "[" << __LINE__ << "]"
-#endif
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/detail/singleton.hpp b/contrib/restricted/boost/boost/thread/detail/singleton.hpp
deleted file mode 100644
index a20a42908d..0000000000
--- a/contrib/restricted/boost/boost/thread/detail/singleton.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (C) 2001-2003
-// Mac Murrett
-//
-// 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 for most recent version including documentation.
-
-#ifndef BOOST_SINGLETON_MJM012402_HPP
-#define BOOST_SINGLETON_MJM012402_HPP
-
-#include <boost/thread/detail/config.hpp>
-
-namespace boost {
-namespace detail {
-namespace thread {
-
-// class singleton has the same goal as all singletons: create one instance of
-// a class on demand, then dish it out as requested.
-
-template <class T>
-class singleton : private T
-{
-private:
- singleton();
- ~singleton();
-
-public:
- static T &instance();
-};
-
-
-template <class T>
-inline singleton<T>::singleton()
-{
- /* no-op */
-}
-
-template <class T>
-inline singleton<T>::~singleton()
-{
- /* no-op */
-}
-
-template <class T>
-/*static*/ T &singleton<T>::instance()
-{
- // function-local static to force this to work correctly at static
- // initialization time.
- static singleton<T> s_oT;
- return(s_oT);
-}
-
-} // namespace thread
-} // namespace detail
-} // namespace boost
-
-#endif // BOOST_SINGLETON_MJM012402_HPP
diff --git a/contrib/restricted/boost/boost/thread/detail/tss_hooks.hpp b/contrib/restricted/boost/boost/thread/detail/tss_hooks.hpp
deleted file mode 100644
index b2ceece3dd..0000000000
--- a/contrib/restricted/boost/boost/thread/detail/tss_hooks.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-// (C) Copyright Michael Glassford 2004.
-// Use, modification and distribution are subject to 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)
-
-#if !defined(BOOST_TLS_HOOKS_HPP)
-#define BOOST_TLS_HOOKS_HPP
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-#if defined(BOOST_HAS_WINTHREADS)
-
-namespace boost
-{
- BOOST_THREAD_DECL void __cdecl on_process_enter(void);
- //Function to be called when the exe or dll
- //that uses Boost.Threads first starts
- //or is first loaded.
- //Should be called only before the first call to
- //on_thread_enter().
- //Called automatically by Boost.Threads when
- //a method for doing so has been discovered.
- //May be omitted; may be called multiple times.
-
- BOOST_THREAD_DECL void __cdecl on_process_exit(void);
- //Function to be called when the exe or dll
- //that uses Boost.Threads first starts
- //or is first loaded.
- //Should be called only after the last call to
- //on_exit_thread().
- //Called automatically by Boost.Threads when
- //a method for doing so has been discovered.
- //Must not be omitted; may be called multiple times.
-
- BOOST_THREAD_DECL void __cdecl on_thread_enter(void);
- //Function to be called just after a thread starts
- //in an exe or dll that uses Boost.Threads.
- //Must be called in the context of the thread
- //that is starting.
- //Called automatically by Boost.Threads when
- //a method for doing so has been discovered.
- //May be omitted; may be called multiple times.
-
- BOOST_THREAD_DECL void __cdecl on_thread_exit(void);
- //Function to be called just be fore a thread ends
- //in an exe or dll that uses Boost.Threads.
- //Must be called in the context of the thread
- //that is ending.
- //Called automatically by Boost.Threads when
- //a method for doing so has been discovered.
- //Must not be omitted; may be called multiple times.
-
- void tss_cleanup_implemented();
- //Dummy function used both to detect whether tss cleanup
- //cleanup has been implemented and to force
- //it to be linked into the Boost.Threads library.
-}
-
-#endif //defined(BOOST_HAS_WINTHREADS)
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif //!defined(BOOST_TLS_HOOKS_HPP)
diff --git a/contrib/restricted/boost/boost/thread/executors/basic_thread_pool.hpp b/contrib/restricted/boost/boost/thread/executors/basic_thread_pool.hpp
deleted file mode 100644
index 365119d1a7..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/basic_thread_pool.hpp
+++ /dev/null
@@ -1,326 +0,0 @@
-// Copyright (C) 2013-2014 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)
-//
-// 2013/09 Vicente J. Botet Escriba
-// Adapt to boost from CCIA C++11 implementation
-// first implementation of a simple pool thread using a vector of threads and a sync_queue.
-
-#ifndef BOOST_THREAD_EXECUTORS_BASIC_THREAD_POOL_HPP
-#define BOOST_THREAD_EXECUTORS_BASIC_THREAD_POOL_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/concurrent_queues/sync_queue.hpp>
-#include <boost/thread/executors/work.hpp>
-#include <boost/thread/csbl/vector.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace executors
-{
- class basic_thread_pool
- {
- public:
- /// type-erasure to store the works to do
- typedef executors::work work;
- private:
- typedef thread thread_t;
- /// A move aware vector type
- typedef csbl::vector<thread_t> thread_vector;
-
- /// A move aware vector
- thread_vector threads;
- /// the thread safe work queue
- concurrent::sync_queue<work > work_queue;
-
- public:
- /**
- * Effects: try to execute one task.
- * Returns: whether a task has been executed.
- * Throws: whatever the current task constructor throws or the task() throws.
- */
- bool try_executing_one()
- {
- try
- {
- work task;
- if (work_queue.try_pull(task) == queue_op_status::success)
- {
- task();
- return true;
- }
- return false;
- }
- catch (...)
- {
- std::terminate();
- //return false;
- }
- }
- /**
- * Effects: schedule one task or yields
- * Throws: whatever the current task constructor throws or the task() throws.
- */
- void schedule_one_or_yield()
- {
- if ( ! try_executing_one())
- {
- this_thread::yield();
- }
- }
- private:
-
- /**
- * The main loop of the worker threads
- */
- void worker_thread()
- {
- try
- {
- for(;;)
- {
- work task;
- try
- {
- queue_op_status st = work_queue.wait_pull(task);
- if (st == queue_op_status::closed) {
- return;
- }
- task();
- }
- catch (boost::thread_interrupted&)
- {
- return;
- }
- }
- }
- catch (...)
- {
- std::terminate();
- return;
- }
- }
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template <class AtThreadEntry>
- void worker_thread1(AtThreadEntry& at_thread_entry)
- {
- at_thread_entry(*this);
- worker_thread();
- }
-#endif
- void worker_thread2(void(*at_thread_entry)(basic_thread_pool&))
- {
- at_thread_entry(*this);
- worker_thread();
- }
- template <class AtThreadEntry>
- void worker_thread3(BOOST_THREAD_FWD_REF(AtThreadEntry) at_thread_entry)
- {
- at_thread_entry(*this);
- worker_thread();
- }
- static void do_nothing_at_thread_entry(basic_thread_pool&) {}
-
- public:
- /// basic_thread_pool is not copyable.
- BOOST_THREAD_NO_COPYABLE(basic_thread_pool)
-
- /**
- * \b Effects: creates a thread pool that runs closures on \c thread_count threads.
- *
- * \b Throws: Whatever exception is thrown while initializing the needed resources.
- */
- basic_thread_pool(unsigned const thread_count = thread::hardware_concurrency()+1)
- {
- try
- {
- threads.reserve(thread_count);
- for (unsigned i = 0; i < thread_count; ++i)
- {
-#if 1
- thread th (&basic_thread_pool::worker_thread, this);
- threads.push_back(thread_t(boost::move(th)));
-#else
- threads.push_back(thread_t(&basic_thread_pool::worker_thread, this)); // do not compile
-#endif
- }
- }
- catch (...)
- {
- close();
- throw;
- }
- }
- /**
- * \b Effects: creates a thread pool that runs closures on \c thread_count threads
- * and executes the at_thread_entry function at the entry of each created thread. .
- *
- * \b Throws: Whatever exception is thrown while initializing the needed resources.
- */
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template <class AtThreadEntry>
- basic_thread_pool( unsigned const thread_count, AtThreadEntry& at_thread_entry)
- {
- try
- {
- threads.reserve(thread_count);
- for (unsigned i = 0; i < thread_count; ++i)
- {
- thread th (&basic_thread_pool::worker_thread1<AtThreadEntry>, this, at_thread_entry);
- threads.push_back(thread_t(boost::move(th)));
- //threads.push_back(thread_t(&basic_thread_pool::worker_thread, this)); // do not compile
- }
- }
- catch (...)
- {
- close();
- throw;
- }
- }
-#endif
- basic_thread_pool( unsigned const thread_count, void(*at_thread_entry)(basic_thread_pool&))
- {
- try
- {
- threads.reserve(thread_count);
- for (unsigned i = 0; i < thread_count; ++i)
- {
- thread th (&basic_thread_pool::worker_thread2, this, at_thread_entry);
- threads.push_back(thread_t(boost::move(th)));
- //threads.push_back(thread_t(&basic_thread_pool::worker_thread, this)); // do not compile
- }
- }
- catch (...)
- {
- close();
- throw;
- }
- }
- template <class AtThreadEntry>
- basic_thread_pool( unsigned const thread_count, BOOST_THREAD_FWD_REF(AtThreadEntry) at_thread_entry)
- {
- try
- {
- threads.reserve(thread_count);
- for (unsigned i = 0; i < thread_count; ++i)
- {
- thread th (&basic_thread_pool::worker_thread3<AtThreadEntry>, this, boost::forward<AtThreadEntry>(at_thread_entry));
- threads.push_back(thread_t(boost::move(th)));
- //threads.push_back(thread_t(&basic_thread_pool::worker_thread, this)); // do not compile
- }
- }
- catch (...)
- {
- close();
- throw;
- }
- }
- /**
- * \b Effects: Destroys the thread pool.
- *
- * \b Synchronization: The completion of all the closures happen before the completion of the \c basic_thread_pool destructor.
- */
- ~basic_thread_pool()
- {
- // signal to all the worker threads that there will be no more submissions.
- close();
- // joins all the threads before destroying the thread pool resources (e.g. the queue).
- join();
- }
-
- /**
- * \b Effects: join all the threads.
- */
- void join()
- {
- for (unsigned i = 0; i < threads.size(); ++i)
- {
- threads[i].interrupt();
- threads[i].join();
- }
- }
-
- /**
- * \b Effects: close the \c basic_thread_pool for submissions.
- * The worker threads will work until there is no more closures to run.
- */
- void close()
- {
- work_queue.close();
- }
-
- /**
- * \b Returns: whether the pool is closed for submissions.
- */
- bool closed()
- {
- return work_queue.closed();
- }
-
- /**
- * \b Requires: \c Closure is a model of \c Callable(void()) and a model of \c CopyConstructible/MoveConstructible.
- *
- * \b Effects: The specified \c closure will be scheduled for execution at some point in the future.
- * If invoked closure throws an exception the \c basic_thread_pool will call \c std::terminate, as is the case with threads.
- *
- * \b Synchronization: completion of \c closure on a particular thread happens before destruction of thread's thread local variables.
- *
- * \b Throws: \c sync_queue_is_closed if the thread pool is closed.
- * Whatever exception that can be throw while storing the closure.
- */
- void submit(BOOST_THREAD_RV_REF(work) closure) {
- work_queue.push(boost::move(closure));
- }
-
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template <typename Closure>
- void submit(Closure & closure)
- {
- submit(work(closure));
- }
-#endif
- void submit(void (*closure)())
- {
- submit(work(closure));
- }
-
- template <typename Closure>
- void submit(BOOST_THREAD_FWD_REF(Closure) closure)
- {
- //submit(work(boost::forward<Closure>(closure)));
- work w((boost::forward<Closure>(closure)));
- submit(boost::move(w));
- }
-
- /**
- * \b Requires: This must be called from an scheduled task.
- *
- * \b Effects: reschedule functions until pred()
- */
- template <typename Pred>
- bool reschedule_until(Pred const& pred)
- {
- do {
- if ( ! try_executing_one())
- {
- return false;
- }
- } while (! pred());
- return true;
- }
-
- };
-}
-using executors::basic_thread_pool;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/executors/detail/priority_executor_base.hpp b/contrib/restricted/boost/boost/thread/executors/detail/priority_executor_base.hpp
deleted file mode 100644
index 1eb0c6e2ac..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/detail/priority_executor_base.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (C) 2014 Ian Forbed
-// Copyright (C) 2014 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)
-//
-
-#ifndef BOOST_THREAD_EXECUTORS_DETAIL_PRIORITY_EXECUTOR_BASE_HPP
-#define BOOST_THREAD_EXECUTORS_DETAIL_PRIORITY_EXECUTOR_BASE_HPP
-
-#include <boost/atomic.hpp>
-#include <boost/function.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/concurrent_queues/sync_timed_queue.hpp>
-#include <boost/thread/executors/work.hpp>
-
-namespace boost
-{
-namespace executors
-{
-namespace detail
-{
- template <class Queue>
- class priority_executor_base
- {
- public:
- //typedef boost::function<void()> work;
- typedef executors::work_pq work;
- protected:
- typedef Queue queue_type;
- queue_type _workq;
-
- priority_executor_base() {}
- public:
-
- ~priority_executor_base()
- {
- if(!closed())
- {
- this->close();
- }
- }
-
- void close()
- {
- _workq.close();
- }
-
- bool closed()
- {
- return _workq.closed();
- }
-
- void loop()
- {
- try
- {
- for(;;)
- {
- try {
- work task;
- queue_op_status st = _workq.wait_pull(task);
- if (st == queue_op_status::closed) return;
- task();
- }
- catch (boost::thread_interrupted&)
- {
- return;
- }
- }
- }
- catch (...)
- {
- std::terminate();
- return;
- }
- }
- }; //end class
-
-} //end detail namespace
-} //end executors namespace
-} //end boost namespace
-#endif
diff --git a/contrib/restricted/boost/boost/thread/executors/detail/scheduled_executor_base.hpp b/contrib/restricted/boost/boost/thread/executors/detail/scheduled_executor_base.hpp
deleted file mode 100644
index ec0038f7e3..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/detail/scheduled_executor_base.hpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (C) 2014 Ian Forbed
-// Copyright (C) 2014-2015 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)
-//
-
-#ifndef BOOST_THREAD_EXECUTORS_DETAIL_SCHEDULED_EXECUTOR_BASE_HPP
-#define BOOST_THREAD_EXECUTORS_DETAIL_SCHEDULED_EXECUTOR_BASE_HPP
-
-#include <boost/thread/concurrent_queues/sync_timed_queue.hpp>
-#include <boost/thread/executors/detail/priority_executor_base.hpp>
-#include <boost/thread/executors/work.hpp>
-#include <boost/thread/thread.hpp>
-
-#include <boost/atomic.hpp>
-#include <boost/function.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace executors
-{
-namespace detail
-{
- template <class Clock=chrono::steady_clock>
- class scheduled_executor_base : public priority_executor_base<concurrent::sync_timed_queue<executors::work_pq, Clock > >
- {
- public:
- typedef executors::work_pq work;
- typedef Clock clock;
- typedef typename clock::duration duration;
- typedef typename clock::time_point time_point;
- protected:
-
- scheduled_executor_base() {}
- public:
-
- ~scheduled_executor_base()
- {
- if(! this->closed())
- {
- this->close();
- }
- }
-
- void submit_at(work w, const time_point& tp)
- {
- this->_workq.push(boost::move(w), tp);
- }
-
- void submit_after(work w, const duration& dura)
- {
- this->_workq.push(boost::move(w), dura+clock::now());
- }
-
- }; //end class
-
-} //end detail namespace
-} //end executors namespace
-} //end boost namespace
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/executors/inline_executor.hpp b/contrib/restricted/boost/boost/thread/executors/inline_executor.hpp
deleted file mode 100644
index 5dd523184e..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/inline_executor.hpp
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright (C) 2014 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)
-//
-// 2013/11 Vicente J. Botet Escriba
-// first implementation of a simple serial scheduler.
-
-#ifndef BOOST_THREAD_INLINE_EXECUTOR_HPP
-#define BOOST_THREAD_INLINE_EXECUTOR_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/executors/work.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace executors
-{
- class inline_executor
- {
- public:
- /// type-erasure to store the works to do
- typedef executors::work work;
- bool closed_;
- mutable mutex mtx_;
- /**
- * Effects: try to execute one task.
- * Returns: whether a task has been executed.
- * Throws: whatever the current task constructor throws or the task() throws.
- */
- bool try_executing_one()
- {
- return false;
- }
-
- public:
- /// inline_executor is not copyable.
- BOOST_THREAD_NO_COPYABLE(inline_executor)
-
- /**
- * \b Effects: creates a inline executor that runs closures immediately.
- *
- * \b Throws: Nothing.
- */
- inline_executor()
- : closed_(false)
- {
- }
- /**
- * \b Effects: Destroys the inline executor.
- *
- * \b Synchronization: The completion of all the closures happen before the completion of the \c inline_executor destructor.
- */
- ~inline_executor()
- {
- // signal to all the worker thread that there will be no more submissions.
- close();
- }
-
- /**
- * \b Effects: close the \c inline_executor for submissions.
- * The loop will work until there is no more closures to run.
- */
- void close()
- {
- lock_guard<mutex> lk(mtx_);
- closed_ = true;
- }
-
- /**
- * \b Returns: whether the pool is closed for submissions.
- */
- bool closed(lock_guard<mutex>& )
- {
- return closed_;
- }
- bool closed()
- {
- lock_guard<mutex> lk(mtx_);
- return closed(lk);
- }
-
- /**
- * \b Requires: \c Closure is a model of \c Callable(void()) and a model of \c CopyConstructible/MoveConstructible.
- *
- * \b Effects: The specified \c closure will be scheduled for execution at some point in the future.
- * If invoked closure throws an exception the \c inline_executor will call \c std::terminate, as is the case with threads.
- *
- * \b Synchronization: completion of \c closure on a particular thread happens before destruction of thread's thread local variables.
- *
- * \b Throws: \c sync_queue_is_closed if the thread pool is closed.
- * Whatever exception that can be throw while storing the closure.
- */
-
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template <typename Closure>
- void submit(Closure & closure)
- {
- {
- lock_guard<mutex> lk(mtx_);
- if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- }
- try
- {
- closure();
- }
- catch (...)
- {
- std::terminate();
- return;
- }
- }
-#endif
- void submit(void (*closure)())
- {
- {
- lock_guard<mutex> lk(mtx_);
- if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- }
- try
- {
- closure();
- }
- catch (...)
- {
- std::terminate();
- return;
- }
- }
-
- template <typename Closure>
- void submit(BOOST_THREAD_FWD_REF(Closure) closure)
- {
- {
- lock_guard<mutex> lk(mtx_);
- if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- }
- try
- {
- closure();
- }
- catch (...)
- {
- std::terminate();
- return;
- }
- }
-
- /**
- * \b Requires: This must be called from an scheduled task.
- *
- * \b Effects: reschedule functions until pred()
- */
- template <typename Pred>
- bool reschedule_until(Pred const& )
- {
- return false;
- }
-
- };
-}
-using executors::inline_executor;
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/executors/loop_executor.hpp b/contrib/restricted/boost/boost/thread/executors/loop_executor.hpp
deleted file mode 100644
index aee7a8d477..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/loop_executor.hpp
+++ /dev/null
@@ -1,209 +0,0 @@
-// Copyright (C) 2013,2014 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)
-//
-// 2013/11 Vicente J. Botet Escriba
-// first implementation of a simple user scheduler.
-// 2013/11 Vicente J. Botet Escriba
-// rename loop_executor.
-
-#ifndef BOOST_THREAD_EXECUTORS_LOOP_EXECUTOR_HPP
-#define BOOST_THREAD_EXECUTORS_LOOP_EXECUTOR_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/concurrent_queues/sync_queue.hpp>
-#include <boost/thread/executors/work.hpp>
-#include <boost/assert.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace executors
-{
-
- class loop_executor
- {
- public:
- /// type-erasure to store the works to do
- typedef executors::work work;
- private:
- /// the thread safe work queue
- concurrent::sync_queue<work > work_queue;
-
- public:
- /**
- * Effects: try to execute one task.
- * Returns: whether a task has been executed.
- * Throws: whatever the current task constructor throws or the task() throws.
- */
- bool try_executing_one()
- {
- return execute_one(/*wait:*/false);
- }
-
- private:
- /**
- * Effects: Execute one task.
- * Remark: If wait is true, waits until a task is available or the executor
- * is closed. If wait is false, returns false immediately if no
- * task is available.
- * Returns: whether a task has been executed (if wait is true, only returns false if closed).
- * Throws: whatever the current task constructor throws or the task() throws.
- */
- bool execute_one(bool wait)
- {
- work task;
- try
- {
- queue_op_status status = wait ?
- work_queue.wait_pull(task) :
- work_queue.try_pull(task);
- if (status == queue_op_status::success)
- {
- task();
- return true;
- }
- BOOST_ASSERT(!wait || status == queue_op_status::closed);
- return false;
- }
- catch (...)
- {
- std::terminate();
- //return false;
- }
- }
-
- public:
- /// loop_executor is not copyable.
- BOOST_THREAD_NO_COPYABLE(loop_executor)
-
- /**
- * \b Effects: creates a thread pool that runs closures using one of its closure-executing methods.
- *
- * \b Throws: Whatever exception is thrown while initializing the needed resources.
- */
- loop_executor()
- {
- }
- /**
- * \b Effects: Destroys the thread pool.
- *
- * \b Synchronization: The completion of all the closures happen before the completion of the \c loop_executor destructor.
- */
- ~loop_executor()
- {
- // signal to all the worker thread that there will be no more submissions.
- close();
- }
-
- /**
- * The main loop of the worker thread
- */
- void loop()
- {
- while (execute_one(/*wait:*/true))
- {
- }
- BOOST_ASSERT(closed());
- while (try_executing_one())
- {
- }
- }
-
- /**
- * \b Effects: close the \c loop_executor for submissions.
- * The loop will work until there is no more closures to run.
- */
- void close()
- {
- work_queue.close();
- }
-
- /**
- * \b Returns: whether the pool is closed for submissions.
- */
- bool closed()
- {
- return work_queue.closed();
- }
-
- /**
- * \b Requires: \c Closure is a model of \c Callable(void()) and a model of \c CopyConstructible/MoveConstructible.
- *
- * \b Effects: The specified \c closure will be scheduled for execution at some point in the future.
- * If invoked closure throws an exception the \c loop_executor will call \c std::terminate, as is the case with threads.
- *
- * \b Synchronization: completion of \c closure on a particular thread happens before destruction of thread's thread local variables.
- *
- * \b Throws: \c sync_queue_is_closed if the thread pool is closed.
- * Whatever exception that can be throw while storing the closure.
- */
- void submit(BOOST_THREAD_RV_REF(work) closure) {
- work_queue.push(boost::move(closure));
- }
-
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template <typename Closure>
- void submit(Closure & closure)
- {
- submit(work(closure));
- }
-#endif
-
- void submit(void (*closure)())
- {
- submit(work(closure));
- }
-
- template <typename Closure>
- void submit(BOOST_THREAD_FWD_REF(Closure) closure)
- {
- //work_queue.push(work(boost::forward<Closure>(closure)));
- work w((boost::forward<Closure>(closure)));
- submit(boost::move(w));
- }
-
- /**
- * \b Requires: This must be called from an scheduled task.
- *
- * \b Effects: reschedule functions until pred()
- */
- template <typename Pred>
- bool reschedule_until(Pred const& pred)
- {
- do {
- if ( ! try_executing_one())
- {
- return false;
- }
- } while (! pred());
- return true;
- }
-
- /**
- * run queued closures
- */
- void run_queued_closures()
- {
- sync_queue<work>::underlying_queue_type q = work_queue.underlying_queue();
- while (! q.empty())
- {
- work& task = q.front();
- task();
- q.pop_front();
- }
- }
-
- };
-}
-using executors::loop_executor;
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/executors/scheduled_thread_pool.hpp b/contrib/restricted/boost/boost/thread/executors/scheduled_thread_pool.hpp
deleted file mode 100644
index bcedbff27a..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/scheduled_thread_pool.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (C) 2014 Ian Forbed
-// Copyright (C) 2014 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)
-//
-
-#ifndef BOOST_THREAD_EXECUTORS_SCHEDULED_THREAD_POOL_HPP
-#define BOOST_THREAD_EXECUTORS_SCHEDULED_THREAD_POOL_HPP
-
-#include <boost/thread/executors/detail/scheduled_executor_base.hpp>
-
-namespace boost
-{
-namespace executors
-{
-
- class scheduled_thread_pool : public detail::scheduled_executor_base<>
- {
- private:
- thread_group _workers;
- public:
-
- scheduled_thread_pool(size_t num_threads) : super()
- {
- for(size_t i = 0; i < num_threads; i++)
- {
- _workers.create_thread(bind(&super::loop, this));
- }
- }
-
- ~scheduled_thread_pool()
- {
- this->close();
- _workers.interrupt_all();
- _workers.join_all();
- }
-
- private:
- typedef detail::scheduled_executor_base<> super;
- }; //end class
-
-} //end executors namespace
-
-using executors::scheduled_thread_pool;
-
-} //end boost
-#endif
-
diff --git a/contrib/restricted/boost/boost/thread/executors/scheduler.hpp b/contrib/restricted/boost/boost/thread/executors/scheduler.hpp
deleted file mode 100644
index 7a4c93ed07..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/scheduler.hpp
+++ /dev/null
@@ -1,281 +0,0 @@
-// Copyright (C) 2014 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)
-//
-
-#ifndef BOOST_THREAD_EXECUTORS_SCHEDULER_HPP
-#define BOOST_THREAD_EXECUTORS_SCHEDULER_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/executors/detail/scheduled_executor_base.hpp>
-
-#include <boost/chrono/time_point.hpp>
-#include <boost/chrono/duration.hpp>
-#include <boost/chrono/system_clocks.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-#if defined(BOOST_MSVC)
-# pragma warning(push)
-# pragma warning(disable: 4355) // 'this' : used in base member initializer list
-#endif
-
-namespace boost
-{
- namespace executors
- {
- /// Wraps the reference to an executor and a function to make a work that submit the function using the executor.
- template <class Executor, class Function>
- class resubmitter
- {
- public:
- resubmitter(Executor& ex, Function funct) :
- ex(ex),
- funct(boost::move(funct))
- {}
-
- void operator()()
- {
- ex.submit(funct);
- }
-
- private:
- Executor& ex;
- Function funct;
- };
-
- /// resubmitter factory
- template <class Executor, class Function>
- resubmitter<Executor, typename decay<Function>::type>
- resubmit(Executor& ex, BOOST_THREAD_FWD_REF(Function) funct) {
- return resubmitter<Executor, typename decay<Function>::type >(ex, boost::move(funct));
- }
-
- /// Wraps references to a @c Scheduler and an @c Executor providing an @c Executor that
- /// resubmit the function using the referenced Executor at a given @c time_point known at construction.
- template <class Scheduler, class Executor>
- class resubmit_at_executor
- {
- public:
- typedef typename Scheduler::clock clock;
- typedef typename Scheduler::work work;
-
- template <class Duration>
- resubmit_at_executor(Scheduler& sch, Executor& ex, chrono::time_point<clock, Duration> const& tp) :
- sch(sch),
- ex(ex),
- tp(tp),
- is_closed(false)
- {
- }
-
- ~resubmit_at_executor()
- {
- close();
- }
-
- template <class Work>
- void submit(BOOST_THREAD_FWD_REF(Work) w)
- {
- if (closed())
- {
- BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- }
- sch.submit_at(resubmit(ex,boost::forward<Work>(w)), tp);
- }
-
- Executor& underlying_executor()
- {
- return ex;
- }
- Scheduler& underlying_scheduler()
- {
- return sch;
- }
-
- void close()
- {
- is_closed = true;
- }
-
- bool closed()
- {
- return is_closed || sch.closed() || ex.closed();
- }
-
- private:
- Scheduler& sch;
- Executor& ex;
- typename clock::time_point tp;
- bool is_closed;
- };
-
-
- /// Expression template helper storing a pair of references to an @c Scheduler and an @c Executor
- /// It provides factory helper functions such as at/after that convert these a pair of @c Scheduler @c Executor
- /// into an new @c Executor that submit the work using the referenced @c Executor at/after a specific time/duration
- /// respectively, using the referenced @Scheduler.
- template <class Scheduler, class Executor>
- class scheduler_executor_wrapper
- {
- public:
- typedef typename Scheduler::clock clock;
- typedef typename Scheduler::work work;
- typedef resubmit_at_executor<Scheduler, Executor> the_executor;
-
- scheduler_executor_wrapper(Scheduler& sch, Executor& ex) :
- sch(sch),
- ex(ex)
- {}
-
- ~scheduler_executor_wrapper()
- {
- }
-
- Executor& underlying_executor()
- {
- return ex;
- }
- Scheduler& underlying_scheduler()
- {
- return sch;
- }
-
- template <class Rep, class Period>
- the_executor after(chrono::duration<Rep,Period> const& rel_time)
- {
- return at(clock::now() + rel_time );
- }
-
- template <class Duration>
- the_executor at(chrono::time_point<clock,Duration> const& abs_time)
- {
- return the_executor(sch, ex, abs_time);
- }
-
- private:
- Scheduler& sch;
- Executor& ex;
- }; //end class
-
- /// Wraps a reference to a @c Scheduler providing an @c Executor that
- /// run the function at a given @c time_point known at construction.
- template <class Scheduler>
- class at_executor
- {
- public:
- typedef typename Scheduler::clock clock;
- typedef typename Scheduler::work work;
- typedef typename clock::time_point time_point;
-
- template <class Duration>
- at_executor(Scheduler& sch, chrono::time_point<clock,Duration> const& tp) :
- sch(sch),
- tp(tp),
- is_closed(false)
- {}
-
- ~at_executor()
- {
- close();
- }
-
- Scheduler& underlying_scheduler()
- {
- return sch;
- }
-
- void close()
- {
- is_closed = true;
- }
-
- bool closed()
- {
- return is_closed || sch.closed();
- }
-
- template <class Work>
- void submit(BOOST_THREAD_FWD_REF(Work) w)
- {
- if (closed())
- {
- BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- }
- sch.submit_at(boost::forward<Work>(w), tp);
- }
-
- template <class Executor>
- resubmit_at_executor<Scheduler, Executor> on(Executor& ex)
- {
- return resubmit_at_executor<Scheduler, Executor>(sch, ex, tp);
- }
-
- private:
- Scheduler& sch;
- time_point tp;
- bool is_closed;
- }; //end class
-
- /// A @c Scheduler using a specific thread. Note that a Scheduler is not an Executor.
- /// It provides factory helper functions such as at/after that convert a @c Scheduler into an @c Executor
- /// that submit the work at/after a specific time/duration respectively.
- template <class Clock = chrono::steady_clock>
- class scheduler : public detail::scheduled_executor_base<Clock>
- {
- public:
- typedef typename detail::scheduled_executor_base<Clock>::work work;
-
- typedef Clock clock;
-
- scheduler()
- : super(),
- thr(&super::loop, this) {}
-
- ~scheduler()
- {
- this->close();
- thr.interrupt();
- thr.join();
- }
- template <class Ex>
- scheduler_executor_wrapper<scheduler, Ex> on(Ex& ex)
- {
- return scheduler_executor_wrapper<scheduler, Ex>(*this, ex);
- }
-
- template <class Rep, class Period>
- at_executor<scheduler> after(chrono::duration<Rep,Period> const& rel_time)
- {
- return at(rel_time + clock::now());
- }
-
- template <class Duration>
- at_executor<scheduler> at(chrono::time_point<clock,Duration> const& tp)
- {
- return at_executor<scheduler>(*this, tp);
- }
-
- private:
- typedef detail::scheduled_executor_base<Clock> super;
- thread thr;
- };
-
-
- }
- using executors::resubmitter;
- using executors::resubmit;
- using executors::resubmit_at_executor;
- using executors::scheduler_executor_wrapper;
- using executors::at_executor;
- using executors::scheduler;
-}
-
-#if defined(BOOST_MSVC)
-# pragma warning(pop)
-#endif
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/executors/scheduling_adaptor.hpp b/contrib/restricted/boost/boost/thread/executors/scheduling_adaptor.hpp
deleted file mode 100644
index e19c1afc54..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/scheduling_adaptor.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (C) 2014 Ian Forbed
-// Copyright (C) 2014 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)
-//
-
-#ifndef BOOST_THREAD_EXECUTORS_SCHEDULING_ADAPTOR_HPP
-#define BOOST_THREAD_EXECUTORS_SCHEDULING_ADAPTOR_HPP
-
-#include <boost/thread/executors/detail/scheduled_executor_base.hpp>
-
-#if defined(BOOST_MSVC)
-# pragma warning(push)
-# pragma warning(disable: 4355) // 'this' : used in base member initializer list
-#endif
-
-namespace boost
-{
-namespace executors
-{
-
- template <typename Executor>
- class scheduling_adaptor : public detail::scheduled_executor_base<>
- {
- private:
- Executor& _exec;
- thread _scheduler;
- public:
-
- scheduling_adaptor(Executor& ex)
- : super(),
- _exec(ex),
- _scheduler(&super::loop, this) {}
-
- ~scheduling_adaptor()
- {
- this->close();
- _scheduler.interrupt();
- _scheduler.join();
- }
-
- Executor& underlying_executor()
- {
- return _exec;
- }
-
- private:
- typedef detail::scheduled_executor_base<> super;
- }; //end class
-
-} //end executors
-
- using executors::scheduling_adaptor;
-
-} //end boost
-
-#if defined(BOOST_MSVC)
-# pragma warning(pop)
-#endif
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/executors/serial_executor.hpp b/contrib/restricted/boost/boost/thread/executors/serial_executor.hpp
deleted file mode 100644
index 7973c5d928..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/serial_executor.hpp
+++ /dev/null
@@ -1,225 +0,0 @@
-// Copyright (C) 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)
-//
-// 2013/11 Vicente J. Botet Escriba
-// first implementation of a simple serial scheduler.
-
-#ifndef BOOST_THREAD_SERIAL_EXECUTOR_HPP
-#define BOOST_THREAD_SERIAL_EXECUTOR_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/concurrent_queues/sync_queue.hpp>
-#include <boost/thread/executors/work.hpp>
-#include <boost/thread/executors/generic_executor_ref.hpp>
-#include <boost/thread/future.hpp>
-#include <boost/thread/scoped_thread.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-#if defined(BOOST_MSVC)
-# pragma warning(push)
-# pragma warning(disable: 4355) // 'this' : used in base member initializer list
-#endif
-
-namespace boost
-{
-namespace executors
-{
- class serial_executor
- {
- public:
- /// type-erasure to store the works to do
- typedef executors::work work;
- private:
- typedef scoped_thread<> thread_t;
-
- /// the thread safe work queue
- concurrent::sync_queue<work > work_queue;
- generic_executor_ref ex;
- thread_t thr;
-
- struct try_executing_one_task {
- work& task;
- boost::promise<void> &p;
- try_executing_one_task(work& task, boost::promise<void> &p)
- : task(task), p(p) {}
- void operator()() {
- try {
- task();
- p.set_value();
- } catch (...)
- {
- p.set_exception(current_exception());
- }
- }
- };
- public:
- /**
- * \par Returns
- * The underlying executor wrapped on a generic executor reference.
- */
- generic_executor_ref& underlying_executor() BOOST_NOEXCEPT { return ex; }
-
- /**
- * Effects: try to execute one task.
- * Returns: whether a task has been executed.
- * Throws: whatever the current task constructor throws or the task() throws.
- */
- bool try_executing_one()
- {
- work task;
- try
- {
- if (work_queue.try_pull(task) == queue_op_status::success)
- {
- boost::promise<void> p;
- try_executing_one_task tmp(task,p);
- ex.submit(tmp);
- p.get_future().wait();
- return true;
- }
- return false;
- }
- catch (...)
- {
- std::terminate();
- //return false;
- }
- }
- private:
- /**
- * Effects: schedule one task or yields
- * Throws: whatever the current task constructor throws or the task() throws.
- */
- void schedule_one_or_yield()
- {
- if ( ! try_executing_one())
- {
- this_thread::yield();
- }
- }
-
- /**
- * The main loop of the worker thread
- */
- void worker_thread()
- {
- while (!closed())
- {
- schedule_one_or_yield();
- }
- while (try_executing_one())
- {
- }
- }
-
- public:
- /// serial_executor is not copyable.
- BOOST_THREAD_NO_COPYABLE(serial_executor)
-
- /**
- * \b Effects: creates a thread pool that runs closures using one of its closure-executing methods.
- *
- * \b Throws: Whatever exception is thrown while initializing the needed resources.
- */
- template <class Executor>
- serial_executor(Executor& ex)
- : ex(ex), thr(&serial_executor::worker_thread, this)
- {
- }
- /**
- * \b Effects: Destroys the thread pool.
- *
- * \b Synchronization: The completion of all the closures happen before the completion of the \c serial_executor destructor.
- */
- ~serial_executor()
- {
- // signal to the worker thread that there will be no more submissions.
- close();
- }
-
- /**
- * \b Effects: close the \c serial_executor for submissions.
- * The loop will work until there is no more closures to run.
- */
- void close()
- {
- work_queue.close();
- }
-
- /**
- * \b Returns: whether the pool is closed for submissions.
- */
- bool closed()
- {
- return work_queue.closed();
- }
-
- /**
- * \b Requires: \c Closure is a model of \c Callable(void()) and a model of \c CopyConstructible/MoveConstructible.
- *
- * \b Effects: The specified \c closure will be scheduled for execution at some point in the future.
- * If invoked closure throws an exception the \c serial_executor will call \c std::terminate, as is the case with threads.
- *
- * \b Synchronization: completion of \c closure on a particular thread happens before destruction of thread's thread local variables.
- *
- * \b Throws: \c sync_queue_is_closed if the thread pool is closed.
- * Whatever exception that can be throw while storing the closure.
- */
- void submit(BOOST_THREAD_RV_REF(work) closure)
- {
- work_queue.push(boost::move(closure));
- }
-
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template <typename Closure>
- void submit(Closure & closure)
- {
- submit(work(closure));
- }
-#endif
- void submit(void (*closure)())
- {
- submit(work(closure));
- }
-
- template <typename Closure>
- void submit(BOOST_THREAD_FWD_REF(Closure) closure)
- {
- work w((boost::forward<Closure>(closure)));
- submit(boost::move(w));
- }
-
- /**
- * \b Requires: This must be called from an scheduled task.
- *
- * \b Effects: reschedule functions until pred()
- */
- template <typename Pred>
- bool reschedule_until(Pred const& pred)
- {
- do {
- if ( ! try_executing_one())
- {
- return false;
- }
- } while (! pred());
- return true;
- }
-
- };
-}
-using executors::serial_executor;
-}
-
-#if defined(BOOST_MSVC)
-# pragma warning(pop)
-#endif
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/executors/serial_executor_cont.hpp b/contrib/restricted/boost/boost/thread/executors/serial_executor_cont.hpp
deleted file mode 100644
index 91087890be..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/serial_executor_cont.hpp
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright (C) 2015 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)
-//
-// 2013/11 Vicente J. Botet Escriba
-// first implementation of a simple serial scheduler.
-
-#ifndef BOOST_THREAD_SERIAL_EXECUTOR_CONT_HPP
-#define BOOST_THREAD_SERIAL_EXECUTOR_CONT_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/concurrent_queues/sync_queue.hpp>
-#include <boost/thread/executors/work.hpp>
-#include <boost/thread/executors/generic_executor_ref.hpp>
-#include <boost/thread/future.hpp>
-#include <boost/thread/scoped_thread.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace executors
-{
- class serial_executor_cont
- {
- public:
- /// type-erasure to store the works to do
- typedef executors::work work;
- private:
-
- generic_executor_ref ex_;
- future<void> fut_; // protected by mtx_
- bool closed_; // protected by mtx_
- mutex mtx_;
-
- struct continuation {
- work task;
- template <class X>
- struct result {
- typedef void type;
- };
- continuation(BOOST_THREAD_RV_REF(work) tsk)
- : task(boost::move(tsk)) {}
- void operator()(future<void> f)
- {
- try {
- task();
- } catch (...) {
- std::terminate();
- }
- }
- };
-
- bool closed(lock_guard<mutex>&) const
- {
- return closed_;
- }
- public:
- /**
- * \par Returns
- * The underlying executor wrapped on a generic executor reference.
- */
- generic_executor_ref& underlying_executor() BOOST_NOEXCEPT { return ex_; }
-
- /// serial_executor_cont is not copyable.
- BOOST_THREAD_NO_COPYABLE(serial_executor_cont)
-
- /**
- * \b Effects: creates a serial executor that runs closures in fifo order using one the associated executor.
- *
- * \b Throws: Whatever exception is thrown while initializing the needed resources.
- *
- * \b Notes:
- * * The lifetime of the associated executor must outlive the serial executor.
- * * The current implementation doesn't support submission from synchronous continuation, that is,
- * - the executor must execute the continuation asynchronously or
- * - the continuation can not submit to this serial executor.
- */
- template <class Executor>
- serial_executor_cont(Executor& ex)
- : ex_(ex), fut_(make_ready_future()), closed_(false)
- {
- }
- /**
- * \b Effects: Destroys the thread pool.
- *
- * \b Synchronization: The completion of all the closures happen before the completion of the \c serial_executor_cont destructor.
- */
- ~serial_executor_cont()
- {
- // signal to the worker thread that there will be no more submissions.
- close();
- }
-
- /**
- * \b Effects: close the \c serial_executor_cont for submissions.
- * The loop will work until there is no more closures to run.
- */
- void close()
- {
- lock_guard<mutex> lk(mtx_);
- closed_ = true;;
- }
-
- /**
- * \b Returns: whether the pool is closed for submissions.
- */
- bool closed()
- {
- lock_guard<mutex> lk(mtx_);
- return closed(lk);
- }
-
- /**
- * Effects: none.
- * Returns: always false.
- * Throws: No.
- * Remark: A serial executor can not execute one of its pending tasks as the tasks depends on the other tasks.
- */
- bool try_executing_one()
- {
- return false;
- }
-
- /**
- * \b Requires: \c Closure is a model of \c Callable(void()) and a model of \c CopyConstructible/MoveConstructible.
- *
- * \b Effects: The specified \c closure will be scheduled for execution after the last submitted closure finish.
- * If the invoked closure throws an exception the \c serial_executor_cont will call \c std::terminate, as is the case with threads.
- *
- * \b Throws: \c sync_queue_is_closed if the executor is closed.
- * Whatever exception that can be throw while storing the closure.
- *
- */
-
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template <typename Closure>
- void submit(Closure & closure)
- {
- lock_guard<mutex> lk(mtx_);
- if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- fut_ = fut_.then(ex_, continuation(work(closure)));
- }
-#endif
- void submit(void (*closure)())
- {
- lock_guard<mutex> lk(mtx_);
- if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- fut_ = fut_.then(ex_, continuation(work(closure)));
- }
-
- template <typename Closure>
- void submit(BOOST_THREAD_FWD_REF(Closure) closure)
- {
- lock_guard<mutex> lk(mtx_);
- if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- fut_ = fut_.then(ex_, continuation(work(boost::forward<Closure>(closure))));
- }
-
- };
-}
-using executors::serial_executor_cont;
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/executors/thread_executor.hpp b/contrib/restricted/boost/boost/thread/executors/thread_executor.hpp
deleted file mode 100644
index c9f49a7b62..0000000000
--- a/contrib/restricted/boost/boost/thread/executors/thread_executor.hpp
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (C) 2014 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)
-//
-// 2014/01 Vicente J. Botet Escriba
-// first implementation of a thread_executor.
-
-#ifndef BOOST_THREAD_THREAD_EXECUTOR_HPP
-#define BOOST_THREAD_THREAD_EXECUTOR_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/executors/work.hpp>
-#include <boost/thread/executors/executor.hpp>
-#include <boost/thread/thread_only.hpp>
-#include <boost/thread/scoped_thread.hpp>
-#include <boost/thread/csbl/vector.hpp>
-#include <boost/thread/concurrent_queues/queue_op_status.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace executors
-{
- class thread_executor
- {
- public:
- /// type-erasure to store the works to do
- typedef executors::work work;
- bool closed_;
- typedef scoped_thread<> thread_t;
- typedef csbl::vector<thread_t> threads_type;
- threads_type threads_;
- mutable mutex mtx_;
-
- /**
- * Effects: try to execute one task.
- * Returns: whether a task has been executed.
- * Throws: whatever the current task constructor throws or the task() throws.
- */
- bool try_executing_one()
- {
- return false;
- }
-
- public:
- /// thread_executor is not copyable.
- BOOST_THREAD_NO_COPYABLE(thread_executor)
-
- /**
- * \b Effects: creates a inline executor that runs closures immediately.
- *
- * \b Throws: Nothing.
- */
- thread_executor()
- : closed_(false)
- {
- }
- /**
- * \b Effects: Waits for closures (if any) to complete, then joins and destroys the threads.
- *
- * \b Synchronization: The completion of all the closures happen before the completion of the \c thread_executor destructor.
- */
- ~thread_executor()
- {
- // signal to all the worker thread that there will be no more submissions.
- close();
- // all the scoped threads will join before destroying
- }
-
- /**
- * \b Effects: close the \c thread_executor for submissions.
- * The loop will work until there is no more closures to run.
- */
- void close()
- {
- lock_guard<mutex> lk(mtx_);
- closed_ = true;
- }
-
- /**
- * \b Returns: whether the pool is closed for submissions.
- */
- bool closed(lock_guard<mutex>& )
- {
- return closed_;
- }
- bool closed()
- {
- lock_guard<mutex> lk(mtx_);
- return closed(lk);
- }
-
- /**
- * \b Requires: \c Closure is a model of \c Callable(void()) and a model of \c CopyConstructible/MoveConstructible.
- *
- * \b Effects: The specified \c closure will be scheduled for execution at some point in the future.
- * If invoked closure throws an exception the \c thread_executor will call \c std::terminate, as is the case with threads.
- *
- * \b Synchronization: completion of \c closure on a particular thread happens before destruction of thread's thread local variables.
- *
- * \b Throws: \c sync_queue_is_closed if the thread pool is closed.
- * Whatever exception that can be throw while storing the closure.
- */
-
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template <typename Closure>
- void submit(Closure & closure)
- {
- lock_guard<mutex> lk(mtx_);
- if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- threads_.reserve(threads_.size() + 1);
- thread th(closure);
- threads_.push_back(thread_t(boost::move(th)));
- }
-#endif
- void submit(void (*closure)())
- {
- lock_guard<mutex> lk(mtx_);
- if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- threads_.reserve(threads_.size() + 1);
- thread th(closure);
- threads_.push_back(thread_t(boost::move(th)));
- }
-
- template <typename Closure>
- void submit(BOOST_THREAD_FWD_REF(Closure) closure)
- {
- lock_guard<mutex> lk(mtx_);
- if (closed(lk)) BOOST_THROW_EXCEPTION( sync_queue_is_closed() );
- threads_.reserve(threads_.size() + 1);
- thread th(boost::forward<Closure>(closure));
- threads_.push_back(thread_t(boost::move(th)));
- }
-
- /**
- * \b Requires: This must be called from an scheduled task.
- *
- * \b Effects: reschedule functions until pred()
- */
- template <typename Pred>
- bool reschedule_until(Pred const&)
- {
- return false;
- }
-
- };
-}
-using executors::thread_executor;
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/experimental/config/inline_namespace.hpp b/contrib/restricted/boost/boost/thread/experimental/config/inline_namespace.hpp
deleted file mode 100644
index 9c3b081fbe..0000000000
--- a/contrib/restricted/boost/boost/thread/experimental/config/inline_namespace.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef BOOST_THREAD_EXPERIMENTAL_CONFIG_INLINE_NAMESPACE_HPP
-#define BOOST_THREAD_EXPERIMENTAL_CONFIG_INLINE_NAMESPACE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/config.hpp>
-
-#if !defined(BOOST_NO_CXX11_INLINE_NAMESPACES)
-# define BOOST_THREAD_INLINE_NAMESPACE(name) inline namespace name
-#else
-# define BOOST_THREAD_INLINE_NAMESPACE(name) namespace name
-#endif
-
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/experimental/exception_list.hpp b/contrib/restricted/boost/boost/thread/experimental/exception_list.hpp
deleted file mode 100644
index 748bfa85ee..0000000000
--- a/contrib/restricted/boost/boost/thread/experimental/exception_list.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef BOOST_THREAD_EXPERIMENTAL_EXCEPTION_LIST_HPP
-#define BOOST_THREAD_EXPERIMENTAL_EXCEPTION_LIST_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/experimental/parallel/v1/exception_list.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/experimental/parallel/v1/exception_list.hpp b/contrib/restricted/boost/boost/thread/experimental/parallel/v1/exception_list.hpp
deleted file mode 100644
index e4d3354f1c..0000000000
--- a/contrib/restricted/boost/boost/thread/experimental/parallel/v1/exception_list.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef BOOST_THREAD_EXPERIMENTAL_PARALLEL_V1_EXCEPTION_LIST_HPP
-#define BOOST_THREAD_EXPERIMENTAL_PARALLEL_V1_EXCEPTION_LIST_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/experimental/parallel/v1/inline_namespace.hpp>
-
-#include <boost/exception_ptr.hpp>
-#include <exception>
-#include <list>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-namespace experimental
-{
-namespace parallel
-{
-BOOST_THREAD_INLINE_NAMESPACE(v1)
-{
-
- class BOOST_SYMBOL_VISIBLE exception_list: public std::exception
- {
- typedef std::list<exception_ptr> exception_ptr_list;
- exception_ptr_list list_;
- public:
- typedef exception_ptr_list::const_iterator const_iterator;
-
- ~exception_list() BOOST_NOEXCEPT_OR_NOTHROW {}
-
- void add(exception_ptr const& e)
- {
- list_.push_back(e);
- }
- size_t size() const BOOST_NOEXCEPT
- {
- return list_.size();
- }
- const_iterator begin() const BOOST_NOEXCEPT
- {
- return list_.begin();
- }
- const_iterator end() const BOOST_NOEXCEPT
- {
- return list_.end();
- }
- const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- return "exception_list";
- }
-
- };
-}
-
-} // parallel
-} // experimental
-} // boost
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/experimental/parallel/v1/inline_namespace.hpp b/contrib/restricted/boost/boost/thread/experimental/parallel/v1/inline_namespace.hpp
deleted file mode 100644
index a607e53c46..0000000000
--- a/contrib/restricted/boost/boost/thread/experimental/parallel/v1/inline_namespace.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef BOOST_THREAD_EXPERIMENTAL_PARALLEL_V1_INLINE_NAMESPACE_HPP
-#define BOOST_THREAD_EXPERIMENTAL_PARALLEL_V1_INLINE_NAMESPACE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/experimental/config/inline_namespace.hpp>
-namespace boost {
-namespace experimental {
-namespace parallel {
-
- BOOST_THREAD_INLINE_NAMESPACE(v1) {}
-
-#if defined(BOOST_NO_CXX11_INLINE_NAMESPACES)
- using namespace v1;
-#endif
-
-}
-}
-}
-#endif
diff --git a/contrib/restricted/boost/boost/thread/experimental/parallel/v2/inline_namespace.hpp b/contrib/restricted/boost/boost/thread/experimental/parallel/v2/inline_namespace.hpp
deleted file mode 100644
index 52d8e2904e..0000000000
--- a/contrib/restricted/boost/boost/thread/experimental/parallel/v2/inline_namespace.hpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef BOOST_THREAD_EXPERIMENTAL_PARALLEL_V2_INLINE_NAMESPACE_HPP
-#define BOOST_THREAD_EXPERIMENTAL_PARALLEL_V2_INLINE_NAMESPACE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/experimental/config/inline_namespace.hpp>
-
-namespace boost {
-namespace experimental {
-namespace parallel {
-
- BOOST_THREAD_INLINE_NAMESPACE(v2) {}
-
-#if defined(BOOST_NO_CXX11_INLINE_NAMESPACES)
- using namespace v2;
-#endif
-
-}
-}
-}
-#endif
diff --git a/contrib/restricted/boost/boost/thread/experimental/parallel/v2/task_region.hpp b/contrib/restricted/boost/boost/thread/experimental/parallel/v2/task_region.hpp
deleted file mode 100644
index e4a5833115..0000000000
--- a/contrib/restricted/boost/boost/thread/experimental/parallel/v2/task_region.hpp
+++ /dev/null
@@ -1,316 +0,0 @@
-#ifndef BOOST_THREAD_EXPERIMENTAL_PARALLEL_V2_TASK_REGION_HPP
-#define BOOST_THREAD_EXPERIMENTAL_PARALLEL_V2_TASK_REGION_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/thread for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/thread/future.hpp>
-#if defined BOOST_THREAD_PROVIDES_EXECUTORS
-#include <boost/thread/executors/basic_thread_pool.hpp>
-#endif
-#include <boost/thread/experimental/exception_list.hpp>
-#include <boost/thread/experimental/parallel/v2/inline_namespace.hpp>
-#include <boost/thread/detail/move.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-#define BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED
-
-namespace boost
-{
-namespace experimental
-{
-namespace parallel
-{
-BOOST_THREAD_INLINE_NAMESPACE(v2)
-{
- class BOOST_SYMBOL_VISIBLE task_canceled_exception: public std::exception
- {
- public:
- //task_canceled_exception() BOOST_NOEXCEPT {}
- //task_canceled_exception(const task_canceled_exception&) BOOST_NOEXCEPT {}
- //task_canceled_exception& operator=(const task_canceled_exception&) BOOST_NOEXCEPT {}
- virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
- { return "task_canceled_exception";}
- };
-
- template <class Executor>
- class task_region_handle_gen;
-
- namespace detail
- {
- void handle_task_region_exceptions(exception_list& errors)
- {
- try {
- throw;
- }
-#if defined BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED
- catch (task_canceled_exception&)
- {
- }
-#endif
- catch (exception_list const& el)
- {
- for (exception_list::const_iterator it = el.begin(); it != el.end(); ++it)
- {
- boost::exception_ptr const& e = *it;
- try {
- rethrow_exception(e);
- }
- catch (...)
- {
- handle_task_region_exceptions(errors);
- }
- }
- }
- catch (...)
- {
- errors.add(boost::current_exception());
- }
- }
-
-#if defined BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED
- template <class TRH, class F>
- struct wrapped
- {
- TRH& tr;
- F f;
- wrapped(TRH& tr, BOOST_THREAD_RV_REF(F) f) : tr(tr), f(move(f))
- {}
- void operator()()
- {
- try
- {
- f();
- }
- catch (...)
- {
- lock_guard<mutex> lk(tr.mtx);
- tr.canceled = true;
- throw;
- }
- }
- };
-#endif
- }
-
- template <class Executor>
- class task_region_handle_gen
- {
- private:
- // Private members and friends
-#if defined BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED
- template <class TRH, class F>
- friend struct detail::wrapped;
-#endif
- template <typename F>
- friend void task_region(BOOST_THREAD_FWD_REF(F) f);
- template<typename F>
- friend void task_region_final(BOOST_THREAD_FWD_REF(F) f);
- template <class Ex, typename F>
- friend void task_region(Ex&, BOOST_THREAD_FWD_REF(F) f);
- template<class Ex, typename F>
- friend void task_region_final(Ex&, BOOST_THREAD_FWD_REF(F) f);
-
- void wait_all()
- {
- wait_for_all(group.begin(), group.end());
-
- for (group_type::iterator it = group.begin(); it != group.end(); ++it)
- {
- future<void>& f = *it;
- if (f.has_exception())
- {
- try
- {
- boost::rethrow_exception(f.get_exception_ptr());
- }
- catch (...)
- {
- detail::handle_task_region_exceptions(exs);
- }
- }
- }
- if (exs.size() != 0)
- {
- boost::throw_exception(exs);
- }
- }
-protected:
-#if ! defined BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED && ! defined BOOST_THREAD_PROVIDES_EXECUTORS
- task_region_handle_gen()
- {}
-#endif
-
-#if defined BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED && defined BOOST_THREAD_PROVIDES_EXECUTORS
- task_region_handle_gen()
- : canceled(false)
- , ex(0)
- {}
- task_region_handle_gen(Executor& ex)
- : canceled(false)
- , ex(&ex)
- {}
-
-#endif
-
-#if ! defined BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED && defined BOOST_THREAD_PROVIDES_EXECUTORS
- task_region_handle_gen()
- : ex(0)
- {}
- task_region_handle_gen(Executor& ex)
- : ex(&ex)
- {}
-#endif
-
-#if defined BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED && ! defined BOOST_THREAD_PROVIDES_EXECUTORS
- task_region_handle_gen()
- : canceled(false)
- {
- }
-#endif
-
- ~task_region_handle_gen()
- {
- //wait_all();
- }
-
-#if defined BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED
- mutable mutex mtx;
- bool canceled;
-#endif
-#if defined BOOST_THREAD_PROVIDES_EXECUTORS
- Executor* ex;
-#endif
- exception_list exs;
- typedef csbl::vector<future<void> > group_type;
- group_type group;
-
- public:
- BOOST_DELETED_FUNCTION(task_region_handle_gen(const task_region_handle_gen&))
- BOOST_DELETED_FUNCTION(task_region_handle_gen& operator=(const task_region_handle_gen&))
- BOOST_DELETED_FUNCTION(task_region_handle_gen* operator&() const)
-
- public:
- template<typename F>
- void run(BOOST_THREAD_FWD_REF(F) f)
- {
-#if defined BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED
- {
- lock_guard<mutex> lk(mtx);
- if (canceled) {
- boost::throw_exception(task_canceled_exception());
- }
- }
-#if defined BOOST_THREAD_PROVIDES_EXECUTORS
- group.push_back(async(*ex, detail::wrapped<task_region_handle_gen<Executor>, F>(*this, forward<F>(f))));
-#else
- group.push_back(async(detail::wrapped<task_region_handle_gen<Executor>, F>(*this, forward<F>(f))));
-#endif
-#else
-#if defined BOOST_THREAD_PROVIDES_EXECUTORS
- group.push_back(async(*ex, forward<F>(f)));
-#else
- group.push_back(async(forward<F>(f)));
-#endif
-#endif
- }
-
- void wait()
- {
-#if defined BOOST_THREAD_TASK_REGION_HAS_SHARED_CANCELED
- {
- lock_guard<mutex> lk(mtx);
- if (canceled) {
- boost::throw_exception(task_canceled_exception());
- }
- }
-#endif
- wait_all();
- }
- };
-#if defined BOOST_THREAD_PROVIDES_EXECUTORS
- typedef basic_thread_pool default_executor;
-#else
- typedef int default_executor;
-#endif
- class task_region_handle :
- public task_region_handle_gen<default_executor>
- {
- default_executor tp;
- template <typename F>
- friend void task_region(BOOST_THREAD_FWD_REF(F) f);
- template<typename F>
- friend void task_region_final(BOOST_THREAD_FWD_REF(F) f);
-
- protected:
- task_region_handle() : task_region_handle_gen<default_executor>()
- {
-#if defined BOOST_THREAD_PROVIDES_EXECUTORS
- ex = &tp;
-#endif
- }
- BOOST_DELETED_FUNCTION(task_region_handle(const task_region_handle&))
- BOOST_DELETED_FUNCTION(task_region_handle& operator=(const task_region_handle&))
- BOOST_DELETED_FUNCTION(task_region_handle* operator&() const)
-
- };
-
- template <typename Executor, typename F>
- void task_region_final(Executor& ex, BOOST_THREAD_FWD_REF(F) f)
- {
- task_region_handle_gen<Executor> tr(ex);
- try
- {
- f(tr);
- }
- catch (...)
- {
- detail::handle_task_region_exceptions(tr.exs);
- }
- tr.wait_all();
- }
-
- template <typename Executor, typename F>
- void task_region(Executor& ex, BOOST_THREAD_FWD_REF(F) f)
- {
- task_region_final(ex, forward<F>(f));
- }
-
- template <typename F>
- void task_region_final(BOOST_THREAD_FWD_REF(F) f)
- {
- task_region_handle tr;
- try
- {
- f(tr);
- }
- catch (...)
- {
- detail::handle_task_region_exceptions(tr.exs);
- }
- tr.wait_all();
- }
-
- template <typename F>
- void task_region(BOOST_THREAD_FWD_REF(F) f)
- {
- task_region_final(forward<F>(f));
- }
-
-} // v2
-} // parallel
-} // experimental
-} // boost
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/experimental/task_region.hpp b/contrib/restricted/boost/boost/thread/experimental/task_region.hpp
deleted file mode 100644
index 9b60d8b19e..0000000000
--- a/contrib/restricted/boost/boost/thread/experimental/task_region.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef BOOST_THREAD_EXPERIMENTAL_TASK_REGION_HPP
-#define BOOST_THREAD_EXPERIMENTAL_TASK_REGION_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/experimental/parallel/v2/task_region.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/externally_locked.hpp b/contrib/restricted/boost/boost/thread/externally_locked.hpp
deleted file mode 100644
index 0d4baaa512..0000000000
--- a/contrib/restricted/boost/boost/thread/externally_locked.hpp
+++ /dev/null
@@ -1,351 +0,0 @@
-// (C) Copyright 2012 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)
-
-
-#ifndef BOOST_THREAD_EXTERNALLY_LOCKED_HPP
-#define BOOST_THREAD_EXTERNALLY_LOCKED_HPP
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/thread/exceptions.hpp>
-#include <boost/thread/lock_concepts.hpp>
-#include <boost/thread/lock_traits.hpp>
-#include <boost/thread/lockable_concepts.hpp>
-#include <boost/thread/strict_lock.hpp>
-
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/core/swap.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
- /**
- * externally_locked cloaks an object of type T, and actually provides full
- * access to that object through the get and set member functions, provided you
- * pass a reference to a strict lock object
- */
-
- //[externally_locked
- template <typename T, typename MutexType = boost::mutex>
- class externally_locked;
- template <typename T, typename MutexType>
- class externally_locked
- {
- //BOOST_CONCEPT_ASSERT(( CopyConstructible<T> ));
- BOOST_CONCEPT_ASSERT(( BasicLockable<MutexType> ));
-
- public:
- typedef MutexType mutex_type;
-
- BOOST_THREAD_COPYABLE_AND_MOVABLE( externally_locked )
- /**
- * Requires: T is a model of CopyConstructible.
- * Effects: Constructs an externally locked object copying the cloaked type.
- */
- externally_locked(mutex_type& mtx, const T& obj) :
- obj_(obj), mtx_(&mtx)
- {
- }
-
- /**
- * Requires: T is a model of Movable.
- * Effects: Constructs an externally locked object by moving the cloaked type.
- */
- externally_locked(mutex_type& mtx, BOOST_THREAD_RV_REF(T) obj) :
- obj_(move(obj)), mtx_(&mtx)
- {
- }
-
- /**
- * Requires: T is a model of DefaultConstructible.
- * Effects: Constructs an externally locked object initializing the cloaked type with the default constructor.
- */
- externally_locked(mutex_type& mtx) // BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(T()))
- : obj_(), mtx_(&mtx)
- {
- }
-
- /**
- * Copy constructor
- */
- externally_locked(externally_locked const& rhs) //BOOST_NOEXCEPT
- : obj_(rhs.obj_), mtx_(rhs.mtx_)
- {
- }
- /**
- * Move constructor
- */
- externally_locked(BOOST_THREAD_RV_REF(externally_locked) rhs) //BOOST_NOEXCEPT
- : obj_(move(rhs.obj_)), mtx_(rhs.mtx_)
- {
- }
-
- /// assignment
- externally_locked& operator=(externally_locked const& rhs) //BOOST_NOEXCEPT
- {
- obj_=rhs.obj_;
- mtx_=rhs.mtx_;
- return *this;
- }
-
- /// move assignment
- externally_locked& operator=(BOOST_THREAD_RV_REF(externally_locked) rhs) // BOOST_NOEXCEPT
- {
- obj_=move(BOOST_THREAD_RV(rhs).obj_);
- mtx_=rhs.mtx_;
- return *this;
- }
-
- void swap(externally_locked& rhs) //BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR)
- {
- swap(obj_, rhs.obj_);
- swap(mtx_, rhs.mtx_);
- }
-
- /**
- * Requires: The lk parameter must be locking the associated mtx.
- *
- * Returns: The address of the cloaked object..
- *
- * Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions
- */
- T& get(strict_lock<mutex_type>& lk)
- {
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
- return obj_;
- }
-
- const T& get(strict_lock<mutex_type>& lk) const
- {
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
- return obj_;
- }
-
- template <class Lock>
- T& get(nested_strict_lock<Lock>& lk)
- {
- BOOST_STATIC_ASSERT( (is_same<mutex_type, typename Lock::mutex_type>::value)); /*< that locks the same type >*/
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
- return obj_;
- }
-
- template <class Lock>
- const T& get(nested_strict_lock<Lock>& lk) const
- {
- BOOST_STATIC_ASSERT( (is_same<mutex_type, typename Lock::mutex_type>::value)); /*< that locks the same type >*/
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
- return obj_;
- }
-
- /**
- * Requires: The lk parameter must be locking the associated mtx.
- * Returns: The address of the cloaked object..
- *
- * Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions
- */
- template <class Lock>
- T& get(Lock& lk)
- {
- BOOST_CONCEPT_ASSERT(( StrictLock<Lock> ));
- BOOST_STATIC_ASSERT( (is_strict_lock<Lock>::value)); /*< lk is a strict lock "sur parolle" >*/
- BOOST_STATIC_ASSERT( (is_same<mutex_type, typename Lock::mutex_type>::value)); /*< that locks the same type >*/
-
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
-
- return obj_;
- }
-
- mutex_type* mutex() const BOOST_NOEXCEPT
- {
- return mtx_;
- }
-
- // modifiers
-
- void lock()
- {
- mtx_->lock();
- }
- void unlock()
- {
- mtx_->unlock();
- }
- bool try_lock()
- {
- return mtx_->try_lock();
- }
- // todo add time related functions
-
- private:
- T obj_;
- mutex_type* mtx_;
- };
- //]
-
- /**
- * externally_locked<T&,M> specialization for T& that cloaks an reference to an object of type T, and actually
- * provides full access to that object through the get and set member functions, provided you
- * pass a reference to a strict lock object.
- */
-
- //[externally_locked_ref
- template <typename T, typename MutexType>
- class externally_locked<T&, MutexType>
- {
- //BOOST_CONCEPT_ASSERT(( CopyConstructible<T> ));
- BOOST_CONCEPT_ASSERT(( BasicLockable<MutexType> ));
-
- public:
- typedef MutexType mutex_type;
-
- BOOST_THREAD_COPYABLE_AND_MOVABLE( externally_locked )
-
- /**
- * Effects: Constructs an externally locked object storing the cloaked reference object.
- */
- externally_locked(T& obj, mutex_type& mtx) BOOST_NOEXCEPT :
- obj_(&obj), mtx_(&mtx)
- {
- }
-
- /// copy constructor
- externally_locked(externally_locked const& rhs) BOOST_NOEXCEPT :
- obj_(rhs.obj_), mtx_(rhs.mtx_)
- {
- }
-
- /// move constructor
- externally_locked(BOOST_THREAD_RV_REF(externally_locked) rhs) BOOST_NOEXCEPT :
- obj_(rhs.obj_), mtx_(rhs.mtx_)
- {
- }
-
- /// assignment
- externally_locked& operator=(externally_locked const& rhs) BOOST_NOEXCEPT
- {
- obj_=rhs.obj_;
- mtx_=rhs.mtx_;
- return *this;
- }
-
- /// move assignment
- externally_locked& operator=(BOOST_THREAD_RV_REF(externally_locked) rhs) BOOST_NOEXCEPT
- {
- obj_=rhs.obj_;
- mtx_=rhs.mtx_;
- return *this;
- }
-
- void swap(externally_locked& rhs) BOOST_NOEXCEPT
- {
- swap(obj_, rhs.obj_);
- swap(mtx_, rhs.mtx_);
- }
- /**
- * Requires: The lk parameter must be locking the associated mtx.
- *
- * Returns: The address of the cloaked object..
- *
- * Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions
- */
- T& get(strict_lock<mutex_type> const& lk)
- {
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
- return *obj_;
- }
-
- const T& get(strict_lock<mutex_type> const& lk) const
- {
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
- return *obj_;
- }
-
- template <class Lock>
- T& get(nested_strict_lock<Lock> const& lk)
- {
- BOOST_STATIC_ASSERT( (is_same<mutex_type, typename Lock::mutex_type>::value)); /*< that locks the same type >*/
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
- return *obj_;
- }
-
- template <class Lock>
- const T& get(nested_strict_lock<Lock> const& lk) const
- {
- BOOST_STATIC_ASSERT( (is_same<mutex_type, typename Lock::mutex_type>::value)); /*< that locks the same type >*/
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
- return *obj_;
- }
-
- /**
- * Requires: The lk parameter must be locking the associated mtx.
- * Returns: The address of the cloaked object..
- *
- * Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions
- */
- template <class Lock>
- T& get(Lock const& lk)
- {
- BOOST_CONCEPT_ASSERT(( StrictLock<Lock> ));
- BOOST_STATIC_ASSERT( (is_strict_lock<Lock>::value)); /*< lk is a strict lock "sur parolle" >*/
- BOOST_STATIC_ASSERT( (is_same<mutex_type, typename Lock::mutex_type>::value)); /*< that locks the same type >*/
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
- return *obj_;
- }
-
- /**
- * Requires: The lk parameter must be locking the associated mtx.
- * Returns: The address of the cloaked object..
- *
- * Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions
- */
- template <class Lock>
- T const& get(Lock const& lk) const
- {
- BOOST_CONCEPT_ASSERT(( StrictLock<Lock> ));
- BOOST_STATIC_ASSERT( (is_strict_lock<Lock>::value)); /*< lk is a strict lock "sur parolle" >*/
- BOOST_STATIC_ASSERT( (is_same<mutex_type, typename Lock::mutex_type>::value)); /*< that locks the same type >*/
- BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/
- return *obj_;
- }
- mutex_type* mutex() const BOOST_NOEXCEPT
- {
- return mtx_;
- }
-
- void lock()
- {
- mtx_->lock();
- }
- void unlock()
- {
- mtx_->unlock();
- }
- bool try_lock()
- {
- return mtx_->try_lock();
- }
- // todo add time related functions
-
- protected:
- T* obj_;
- mutex_type* mtx_;
- };
- //]
-
- template <typename T, typename MutexType>
- void swap(externally_locked<T, MutexType> & lhs, externally_locked<T, MutexType> & rhs) // BOOST_NOEXCEPT
- {
- lhs.swap(rhs);
- }
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/externally_locked_stream.hpp b/contrib/restricted/boost/boost/thread/externally_locked_stream.hpp
deleted file mode 100644
index aa9aeff79d..0000000000
--- a/contrib/restricted/boost/boost/thread/externally_locked_stream.hpp
+++ /dev/null
@@ -1,170 +0,0 @@
-// (C) Copyright 2012 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)
-
-
-#ifndef BOOST_THREAD_EXTERNALLY_LOCKED_STREAM_HPP
-#define BOOST_THREAD_EXTERNALLY_LOCKED_STREAM_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/detail/delete.hpp>
-
-#include <boost/thread/externally_locked.hpp>
-#include <boost/thread/lock_traits.hpp>
-#include <boost/thread/recursive_mutex.hpp>
-#include <boost/thread/strict_lock.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
- template <typename Stream, typename RecursiveMutex=recursive_mutex>
- class externally_locked_stream;
-
- template <class Stream, typename RecursiveMutex=recursive_mutex>
- class stream_guard
- {
-
- friend class externally_locked_stream<Stream, RecursiveMutex> ;
- public:
- typedef typename externally_locked_stream<Stream, RecursiveMutex>::mutex_type mutex_type;
-
- BOOST_THREAD_MOVABLE_ONLY( stream_guard)
-
- stream_guard(externally_locked_stream<Stream, RecursiveMutex>& mtx) :
- mtx_(&mtx)
- {
- mtx.lock();
- }
-
- stream_guard(externally_locked_stream<Stream, RecursiveMutex>& mtx, adopt_lock_t) :
- mtx_(&mtx)
- {
- }
-
- stream_guard(BOOST_THREAD_RV_REF(stream_guard) rhs) BOOST_NOEXCEPT
- : mtx_(rhs.mtx_)
- {
- rhs.mtx_= 0;
- }
-
- ~stream_guard()
- {
- if (mtx_ != 0) mtx_->unlock();
- }
-
- bool owns_lock(const mutex_type * l) const BOOST_NOEXCEPT
- {
- return l == mtx_->mutex();
- }
-
- /**
- * @Requires mtx_
- */
- Stream& get() const
- {
- BOOST_THREAD_ASSERT_PRECONDITION( mtx_, lock_error() );
- return mtx_->get(*this);
- }
- Stream& bypass() const
- {
- return get();
- }
-
-
- private:
- externally_locked_stream<Stream, RecursiveMutex>* mtx_;
- };
-
- template <typename Stream, typename RecursiveMutex>
- struct is_strict_lock_sur_parole<stream_guard<Stream, RecursiveMutex> > : true_type
- {
- };
-
- /**
- * externally_locked_stream cloaks a reference to an stream of type Stream, and actually
- * provides full access to that object through the get and set member functions, provided you
- * pass a reference to a strict lock object.
- */
-
- //[externally_locked_stream
- template <typename Stream, typename RecursiveMutex>
- class externally_locked_stream: public externally_locked<Stream&, RecursiveMutex>
- {
- typedef externally_locked<Stream&, RecursiveMutex> base_type;
- public:
- BOOST_THREAD_NO_COPYABLE( externally_locked_stream)
-
- /**
- * Effects: Constructs an externally locked object storing the cloaked reference object.
- */
- externally_locked_stream(Stream& stream, RecursiveMutex& mtx) BOOST_NOEXCEPT :
- base_type(stream, mtx)
- {
- }
-
- stream_guard<Stream, RecursiveMutex> hold() BOOST_NOEXCEPT
- {
- return stream_guard<Stream, RecursiveMutex> (*this);
- }
- Stream& bypass() const
- {
- stream_guard<Stream, RecursiveMutex> lk(*this);
- return get(lk);
- }
- };
- //]
-
- template <typename Stream, typename RecursiveMutex, typename T>
- inline const stream_guard<Stream, RecursiveMutex>& operator<<(const stream_guard<Stream, RecursiveMutex>& lck, T arg)
- {
- lck.get() << arg;
- return lck;
- }
-
- template <typename Stream, typename RecursiveMutex>
- inline const stream_guard<Stream, RecursiveMutex>& operator<<(const stream_guard<Stream, RecursiveMutex>& lck, Stream& (*arg)(Stream&))
- {
- lck.get() << arg;
- return lck;
- }
-
- template <typename Stream, typename RecursiveMutex, typename T>
- inline const stream_guard<Stream, RecursiveMutex>& operator>>(const stream_guard<Stream, RecursiveMutex>& lck, T& arg)
- {
- lck.get() >> arg;
- return lck;
- }
-
- template <typename Stream, typename RecursiveMutex, typename T>
- inline stream_guard<Stream, RecursiveMutex> operator<<(externally_locked_stream<Stream, RecursiveMutex>& mtx, T arg)
- {
- stream_guard<Stream, RecursiveMutex> lk(mtx);
- mtx.get(lk) << arg;
- return boost::move(lk);
- }
-
- template <typename Stream, typename RecursiveMutex>
- inline stream_guard<Stream, RecursiveMutex> operator<<(externally_locked_stream<Stream, RecursiveMutex>& mtx, Stream& (*arg)(Stream&))
- {
- stream_guard<Stream, RecursiveMutex> lk(mtx);
- mtx.get(lk) << arg;
- return boost::move(lk);
- }
-
- template <typename Stream, typename RecursiveMutex, typename T>
- inline stream_guard<Stream, RecursiveMutex> operator>>(externally_locked_stream<Stream, RecursiveMutex>& mtx, T& arg)
- {
- stream_guard<Stream, RecursiveMutex> lk(mtx);
- mtx.get(lk) >> arg;
- return boost::move(lk);
- }
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/latch.hpp b/contrib/restricted/boost/boost/thread/latch.hpp
deleted file mode 100644
index dc921e68fe..0000000000
--- a/contrib/restricted/boost/boost/thread/latch.hpp
+++ /dev/null
@@ -1,170 +0,0 @@
-// 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)
-// (C) Copyright 2013 Vicente J. Botet Escriba
-
-#ifndef BOOST_THREAD_LATCH_HPP
-#define BOOST_THREAD_LATCH_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/counter.hpp>
-
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/lock_types.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <boost/chrono/duration.hpp>
-#include <boost/chrono/time_point.hpp>
-#include <boost/assert.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
- class latch
- {
- /// @Requires: count_ must be greater than 0
- /// Effect: Decrement the count. Unlocks the lock and notify anyone waiting if we reached zero.
- /// Returns: true if count_ reached the value 0.
- /// @ThreadSafe ensured by the @c lk parameter
- bool count_down(unique_lock<mutex> &)
- /// pre_condition (count_ > 0)
- {
- BOOST_ASSERT(count_ > 0);
- if (--count_ == 0)
- {
- ++generation_;
- //lk.unlock();
- cond_.notify_all();
- return true;
- }
- return false;
- }
- /// Effect: Decrement the count is > 0. Unlocks the lock notify anyone waiting if we reached zero.
- /// Returns: true if count_ is 0.
- /// @ThreadSafe ensured by the @c lk parameter
- bool try_count_down(unique_lock<mutex> &lk)
- {
- if (count_ > 0)
- {
- return count_down(lk);
- }
- return true;
- }
- public:
- BOOST_THREAD_NO_COPYABLE( latch)
-
- /// Constructs a latch with a given count.
- latch(std::size_t count) :
- count_(count), generation_(0)
- {
- }
-
- /// Destructor
- /// Precondition: No threads are waiting or invoking count_down on @c *this.
-
- ~latch()
- {
-
- }
-
- /// Blocks until the latch has counted down to zero.
- void wait()
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- if (count_ == 0) return;
- std::size_t generation(generation_);
- cond_.wait(lk, detail::not_equal(generation, generation_));
- }
-
- /// @return true if the internal counter is already 0, false otherwise
- bool try_wait()
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- return (count_ == 0);
- }
-
- /// try to wait for a specified amount of time is elapsed.
- /// @return whether there is a timeout or not.
- template <class Rep, class Period>
- cv_status wait_for(const chrono::duration<Rep, Period>& rel_time)
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- if (count_ == 0) return cv_status::no_timeout;
- std::size_t generation(generation_);
- return cond_.wait_for(lk, rel_time, detail::not_equal(generation, generation_))
- ? cv_status::no_timeout
- : cv_status::timeout;
- }
-
- /// try to wait until the specified time_point is reached
- /// @return whether there were a timeout or not.
- template <class Clock, class Duration>
- cv_status wait_until(const chrono::time_point<Clock, Duration>& abs_time)
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- if (count_ == 0) return cv_status::no_timeout;
- std::size_t generation(generation_);
- return cond_.wait_until(lk, abs_time, detail::not_equal(generation, generation_))
- ? cv_status::no_timeout
- : cv_status::timeout;
- }
-
- /// Decrement the count and notify anyone waiting if we reach zero.
- /// @Requires count must be greater than 0
- void count_down()
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- count_down(lk);
- }
- /// Effect: Decrement the count if it is > 0 and notify anyone waiting if we reached zero.
- /// Returns: true if count_ was 0 or reached 0.
- bool try_count_down()
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- return try_count_down(lk);
- }
- void signal()
- {
- count_down();
- }
-
- /// Decrement the count and notify anyone waiting if we reach zero.
- /// Blocks until the latch has counted down to zero.
- /// @Requires count must be greater than 0
- void count_down_and_wait()
- {
- boost::unique_lock<boost::mutex> lk(mutex_);
- std::size_t generation(generation_);
- if (count_down(lk))
- {
- return;
- }
- cond_.wait(lk, detail::not_equal(generation, generation_));
- }
- void sync()
- {
- count_down_and_wait();
- }
-
- /// Reset the counter
- /// #Requires This method may only be invoked when there are no other threads currently inside the count_down_and_wait() method.
- void reset(std::size_t count)
- {
- boost::lock_guard<boost::mutex> lk(mutex_);
- //BOOST_ASSERT(count_ == 0);
- count_ = count;
- }
-
- private:
- mutex mutex_;
- condition_variable cond_;
- std::size_t count_;
- std::size_t generation_;
- };
-
-} // namespace boost
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/lock_concepts.hpp b/contrib/restricted/boost/boost/thread/lock_concepts.hpp
deleted file mode 100644
index d96c3dc1b9..0000000000
--- a/contrib/restricted/boost/boost/thread/lock_concepts.hpp
+++ /dev/null
@@ -1,197 +0,0 @@
-// (C) Copyright 2012 Vicente Botet
-//
-// 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)
-
-#ifndef BOOST_THREAD_LOCK_CONCEPTS_HPP
-#define BOOST_THREAD_LOCK_CONCEPTS_HPP
-
-#include <boost/thread/lock_traits.hpp>
-#include <boost/thread/lock_options.hpp>
-#include <boost/thread/lockable_concepts.hpp>
-#include <boost/thread/exceptions.hpp>
-#include <boost/thread/detail/move.hpp>
-
-#include <boost/chrono/chrono.hpp>
-#include <boost/concept_check.hpp>
-#include <boost/static_assert.hpp>
-
-namespace boost
-{
-
- /**
- * BasicLock object supports the basic features
- * required to delimit a critical region
- * Supports the basic lock, unlock and try_lock functions and
- * defines the lock traits
- */
-
- template <typename Lk>
- struct BasicLock
- {
- typedef typename Lk::mutex_type mutex_type;
- void cvt_mutex_ptr(mutex_type*) {}
- BOOST_CONCEPT_ASSERT(( BasicLockable<mutex_type> ));
-
- BOOST_CONCEPT_USAGE(BasicLock)
- {
- const Lk l1(mtx);
- Lk l2(mtx, defer_lock);
- Lk l3(mtx, adopt_lock);
- Lk l4(( Lk()));
- Lk l5(( boost::move(l2)));
- cvt_mutex_ptr(l1.mutex());
- if (l1.owns_lock()) return;
- if (l1) return;
- if (!l1) return;
-
- l2.lock();
- l2.unlock();
- l2.release();
-
- }
- BasicLock() :
- mtx(*static_cast<mutex_type*>(0))
- {}
- private:
- BasicLock operator=(BasicLock const&);
- mutex_type& mtx;
- }
- ;
-
- template <typename Lk>
- struct Lock
- {
- BOOST_CONCEPT_ASSERT(( BasicLock<Lk> ));
- typedef typename Lk::mutex_type mutex_type;
- BOOST_CONCEPT_ASSERT(( Lockable<mutex_type> ));
-
- BOOST_CONCEPT_USAGE(Lock)
- {
- Lk l1(mtx, try_to_lock);
- if (l1.try_lock()) return;
- }
- Lock() :
- mtx(*static_cast<mutex_type*>(0))
- {}
- private:
- Lock operator=(Lock const&);
- mutex_type& mtx;
- };
-
- template <typename Lk>
- struct TimedLock
- {
- BOOST_CONCEPT_ASSERT(( Lock<Lk> ));
- typedef typename Lk::mutex_type mutex_type;
- BOOST_CONCEPT_ASSERT(( TimedLockable<mutex_type> ));
-
- BOOST_CONCEPT_USAGE(TimedLock)
- {
- const Lk l1(mtx, t);
- Lk l2(mtx, d);
- if (l1.try_lock_until(t)) return;
- if (l1.try_lock_for(d)) return;
- }
- TimedLock() :
- mtx(*static_cast<mutex_type*>(0))
- {}
- private:
- TimedLock operator=(TimedLock const&);
- mutex_type& mtx;
- boost::chrono::system_clock::time_point t;
- boost::chrono::system_clock::duration d;
- };
-
- template <typename Lk>
- struct UniqueLock
- {
- BOOST_CONCEPT_ASSERT(( TimedLock<Lk> ));
- typedef typename Lk::mutex_type mutex_type;
-
- BOOST_CONCEPT_USAGE(UniqueLock)
- {
-
- }
- UniqueLock() :
- mtx(*static_cast<mutex_type*>(0))
- {}
- private:
- UniqueLock operator=(UniqueLock const&);
- mutex_type& mtx;
- };
-
- template <typename Lk>
- struct SharedLock
- {
- BOOST_CONCEPT_ASSERT(( TimedLock<Lk> ));
- typedef typename Lk::mutex_type mutex_type;
-
- BOOST_CONCEPT_USAGE(SharedLock)
- {
- }
- SharedLock() :
- mtx(*static_cast<mutex_type*>(0))
- {}
- private:
- SharedLock operator=(SharedLock const&);
- mutex_type& mtx;
-
- };
-
- template <typename Lk>
- struct UpgradeLock
- {
- BOOST_CONCEPT_ASSERT(( SharedLock<Lk> ));
- typedef typename Lk::mutex_type mutex_type;
-
- BOOST_CONCEPT_USAGE(UpgradeLock)
- {
- }
- UpgradeLock() :
- mtx(*static_cast<mutex_type*>(0))
- {}
- private:
- UpgradeLock operator=(UpgradeLock const&);
- mutex_type& mtx;
- };
-
- /**
- * An StrictLock is a scoped lock guard ensuring the mutex is locked on the
- * scope of the lock, by locking the mutex on construction and unlocking it on
- * destruction.
- *
- * Essentially, a StrictLock's role is only to live on the stack as an
- * automatic variable. strict_lock must adhere to a non-copy and non-alias
- * policy. StrictLock disables copying by making the copy constructor and the
- * assignment operator private. While we're at it, let's disable operator new
- * and operator delete; strict locks are not intended to be allocated on the
- * heap. StrictLock avoids aliasing by using a slightly less orthodox and
- * less well-known technique: disable address taking.
- */
-
- template <typename Lk>
- struct StrictLock
- {
- typedef typename Lk::mutex_type mutex_type;
- BOOST_CONCEPT_ASSERT(( BasicLockable<mutex_type> ));
- BOOST_STATIC_ASSERT(( is_strict_lock<Lk>::value ));
-
- BOOST_CONCEPT_USAGE( StrictLock)
- {
- if (l1.owns_lock(&mtx)) return;
- }
- StrictLock() :
- l1(*static_cast<Lk*>(0)),
- mtx(*static_cast<mutex_type*>(0))
- {}
- private:
- StrictLock operator=(StrictLock const&);
-
- Lk const& l1;
- mutex_type const& mtx;
-
- };
-
-}
-#endif
diff --git a/contrib/restricted/boost/boost/thread/lock_factories.hpp b/contrib/restricted/boost/boost/thread/lock_factories.hpp
deleted file mode 100644
index 523b90a5ea..0000000000
--- a/contrib/restricted/boost/boost/thread/lock_factories.hpp
+++ /dev/null
@@ -1,78 +0,0 @@
-// 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)
-// (C) Copyright 2012 Vicente J. Botet Escriba
-
-#ifndef BOOST_THREAD_LOCK_FACTORIES_HPP
-#define BOOST_THREAD_LOCK_FACTORIES_HPP
-
-#include <boost/thread/lock_types.hpp>
-#include <boost/thread/lock_algorithms.hpp>
-#if ! defined(BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS)
-#include <tuple> // todo change to <boost/tuple.hpp> once Boost.Tuple or Boost.Fusion provides Move semantics.
-#endif
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
- template <typename Lockable>
- unique_lock<Lockable> make_unique_lock(Lockable& mtx)
- {
- return unique_lock<Lockable> (mtx);
- }
-
- template <typename Lockable>
- unique_lock<Lockable> make_unique_lock(Lockable& mtx, adopt_lock_t)
- {
- return unique_lock<Lockable> (mtx, adopt_lock);
- }
-
- template <typename Lockable>
- unique_lock<Lockable> make_unique_lock(Lockable& mtx, defer_lock_t)
- {
- return unique_lock<Lockable> (mtx, defer_lock);
- }
-
- template <typename Lockable>
- unique_lock<Lockable> make_unique_lock(Lockable& mtx, try_to_lock_t)
- {
- return unique_lock<Lockable> (mtx, try_to_lock);
- }
-#if ! defined(BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS)
-
-#if ! defined BOOST_NO_CXX11_VARIADIC_TEMPLATES
- template <typename ...Lockable>
- std::tuple<unique_lock<Lockable> ...> make_unique_locks(Lockable& ...mtx)
- {
- boost::lock(mtx...);
- return std::tuple<unique_lock<Lockable> ...>(unique_lock<Lockable>(mtx, adopt_lock)...);
- }
-#else
- template <typename L1, typename L2>
- std::tuple<unique_lock<L1>, unique_lock<L2> > make_unique_locks(L1& m1, L2& m2)
- {
- boost::lock(m1, m2);
- return std::tuple<unique_lock<L1>,unique_lock<L2> >(
- unique_lock<L1>(m1, adopt_lock),
- unique_lock<L2>(m2, adopt_lock)
- );
- }
- template <typename L1, typename L2, typename L3>
- std::tuple<unique_lock<L1>, unique_lock<L2>, unique_lock<L3> > make_unique_locks(L1& m1, L2& m2, L3& m3)
- {
- boost::lock(m1, m2, m3);
- return std::tuple<unique_lock<L1>,unique_lock<L2>,unique_lock<L3> >(
- unique_lock<L1>(m1, adopt_lock),
- unique_lock<L2>(m2, adopt_lock),
- unique_lock<L3>(m3, adopt_lock)
- );
- }
-
-#endif
-#endif
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-#endif
diff --git a/contrib/restricted/boost/boost/thread/lock_traits.hpp b/contrib/restricted/boost/boost/thread/lock_traits.hpp
deleted file mode 100644
index e45d822983..0000000000
--- a/contrib/restricted/boost/boost/thread/lock_traits.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// 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)
-// (C) Copyright 2009-2012 Vicente J. Botet Escriba
-
-#ifndef BOOST_THREAD_LOCK_TRAITS_HPP
-#define BOOST_THREAD_LOCK_TRAITS_HPP
-
-#include <boost/thread/detail/config.hpp>
-//#include <boost/thread/detail/move.hpp>
-//#include <boost/thread/exceptions.hpp>
-//
-//#ifdef BOOST_THREAD_USES_CHRONO
-//#include <boost/chrono/time_point.hpp>
-//#include <boost/chrono/duration.hpp>
-//#endif
-
-#include <boost/type_traits/integral_constant.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
-/**
- * An strict lock is a lock ensuring the mutex is locked on the scope of the lock
- * There is no single way to define a strict lock as the strict_lock and
- * nesteed_strict_lock shows. So we need a metafunction that states if a
- * lock is a strict lock "sur parole".
- */
-
-template <typename Lock>
-struct is_strict_lock_sur_parolle : false_type {};
-
-
-template <typename Lock>
-struct is_strict_lock_sur_parole : is_strict_lock_sur_parolle<Lock> {};
-
-template <typename Lock>
-struct is_strict_lock : is_strict_lock_sur_parole<Lock> {};
-
-}
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/lockable_adapter.hpp b/contrib/restricted/boost/boost/thread/lockable_adapter.hpp
deleted file mode 100644
index 93d9ba5023..0000000000
--- a/contrib/restricted/boost/boost/thread/lockable_adapter.hpp
+++ /dev/null
@@ -1,226 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_THREAD_LOCKABLE_ADAPTER_HPP
-#define BOOST_THREAD_LOCKABLE_ADAPTER_HPP
-
-#include <boost/thread/detail/delete.hpp>
-#include <boost/chrono/chrono.hpp>
-
-namespace boost
-{
-
- //[basic_lockable_adapter
- template <typename BasicLockable>
- class basic_lockable_adapter
- {
- public:
- typedef BasicLockable mutex_type;
-
- protected:
- mutex_type& lockable() const
- {
- return lockable_;
- }
- mutable mutex_type lockable_; /*< mutable so that it can be modified by const functions >*/
- public:
-
- BOOST_THREAD_NO_COPYABLE( basic_lockable_adapter) /*< no copyable >*/
-
- basic_lockable_adapter()
- {}
-
- void lock() const
- {
- lockable().lock();
- }
- void unlock() const
- {
- lockable().unlock();
- }
-
- };
- //]
-
- //[lockable_adapter
- template <typename Lockable>
- class lockable_adapter : public basic_lockable_adapter<Lockable>
- {
- public:
- typedef Lockable mutex_type;
-
- bool try_lock() const
- {
- return this->lockable().try_lock();
- }
- };
- //]
-
- //[timed_lockable_adapter
- template <typename TimedLock>
- class timed_lockable_adapter: public lockable_adapter<TimedLock>
- {
- public:
- typedef TimedLock mutex_type;
-
- template <typename Clock, typename Duration>
- bool try_lock_until(chrono::time_point<Clock, Duration> const & abs_time) const
- {
- return this->lockable().try_lock_until(abs_time);
- }
- template <typename Rep, typename Period>
- bool try_lock_for(chrono::duration<Rep, Period> const & rel_time) const
- {
- return this->lockable().try_lock_for(rel_time);
- }
-
- };
- //]
-
- //[shared_lockable_adapter
- template <typename SharableLock>
- class shared_lockable_adapter: public timed_lockable_adapter<SharableLock>
- {
- public:
- typedef SharableLock mutex_type;
-
- void lock_shared() const
- {
- this->lockable().lock_shared();
- }
- bool try_lock_shared() const
- {
- return this->lockable().try_lock_shared();
- }
- void unlock_shared() const
- {
- this->lockable().unlock_shared();
- }
-
- template <typename Clock, typename Duration>
- bool try_lock_shared_until(chrono::time_point<Clock, Duration> const & abs_time) const
- {
- return this->lockable().try_lock_shared_until(abs_time);
- }
- template <typename Rep, typename Period>
- bool try_lock_shared_for(chrono::duration<Rep, Period> const & rel_time) const
- {
- return this->lockable().try_lock_shared_for(rel_time);
- }
-
- };
-
- //]
-
- //[upgrade_lockable_adapter
- template <typename UpgradableLock>
- class upgrade_lockable_adapter: public shared_lockable_adapter<UpgradableLock>
- {
- public:
- typedef UpgradableLock mutex_type;
-
- void lock_upgrade() const
- {
- this->lockable().lock_upgrade();
- }
-
- bool try_lock_upgrade() const
- {
- return this->lockable().try_lock_upgrade();
- }
-
- void unlock_upgrade() const
- {
- this->lockable().unlock_upgrade();
- }
-
- template <typename Clock, typename Duration>
- bool try_lock_upgrade_until(chrono::time_point<Clock, Duration> const & abs_time) const
- {
- return this->lockable().try_lock_upgrade_until(abs_time);
- }
- template <typename Rep, typename Period>
- bool try_lock_upgrade_for(chrono::duration<Rep, Period> const & rel_time) const
- {
- return this->lockable().try_lock_upgrade_for(rel_time);
- }
-
- bool try_unlock_shared_and_lock() const
- {
- return this->lockable().try_unlock_shared_and_lock();
- }
-
- template <typename Clock, typename Duration>
- bool try_unlock_shared_and_lock_until(chrono::time_point<Clock, Duration> const & abs_time) const
- {
- return this->lockable().try_unlock_shared_and_lock_until(abs_time);
- }
- template <typename Rep, typename Period>
- bool try_unlock_shared_and_lock_for(chrono::duration<Rep, Period> const & rel_time) const
- {
- return this->lockable().try_unlock_shared_and_lock_for(rel_time);
- }
-
- void unlock_and_lock_shared() const
- {
- this->lockable().unlock_and_lock_shared();
- }
-
- bool try_unlock_shared_and_lock_upgrade() const
- {
- return this->lockable().try_unlock_shared_and_lock_upgrade();
- }
-
- template <typename Clock, typename Duration>
- bool try_unlock_shared_and_lock_upgrade_until(chrono::time_point<Clock, Duration> const & abs_time) const
- {
- return this->lockable().try_unlock_shared_and_lock_upgrade_until(abs_time);
- }
- template <typename Rep, typename Period>
- bool try_unlock_shared_and_lock_upgrade_for(chrono::duration<Rep, Period> const & rel_time) const
- {
- return this->lockable().try_unlock_shared_and_lock_upgrade_for(rel_time);
- }
-
- void unlock_and_lock_upgrade() const
- {
- this->lockable().unlock_and_lock_upgrade();
- }
-
- void unlock_upgrade_and_lock() const
- {
- this->lockable().unlock_upgrade_and_lock();
- }
-
- bool try_unlock_upgrade_and_lock() const
- {
- return this->lockable().try_unlock_upgrade_and_lock();
- }
- template <typename Clock, typename Duration>
- bool try_unlock_upgrade_and_lock_until(chrono::time_point<Clock, Duration> const & abs_time) const
- {
- return this->lockable().try_unlock_upgrade_and_lock_until(abs_time);
- }
- template <typename Rep, typename Period>
- bool try_unlock_upgrade_and_lock_for(chrono::duration<Rep, Period> const & rel_time) const
- {
- return this->lockable().try_unlock_upgrade_and_lock_for(rel_time);
- }
-
- void unlock_upgrade_and_lock_shared() const
- {
- this->lockable().unlock_upgrade_and_lock_shared();
- }
-
- };
-//]
-
-}
-#endif
diff --git a/contrib/restricted/boost/boost/thread/lockable_concepts.hpp b/contrib/restricted/boost/boost/thread/lockable_concepts.hpp
deleted file mode 100644
index bedd962e3b..0000000000
--- a/contrib/restricted/boost/boost/thread/lockable_concepts.hpp
+++ /dev/null
@@ -1,157 +0,0 @@
-// (C) Copyright 2012 Vicente Botet
-//
-// 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)
-
-#ifndef BOOST_THREAD_LOCKABLE_CONCEPTS_HPP
-#define BOOST_THREAD_LOCKABLE_CONCEPTS_HPP
-
-#include <boost/chrono/chrono.hpp>
-#include <boost/concept_check.hpp>
-
-namespace boost
-{
-
- /**
- * BasicLockable object supports the basic features
- * required to delimit a critical region
- * Supports the basic lock and unlock functions.
- */
-
- //[BasicLockable
- template <typename Mutex>
- struct BasicLockable
- {
-
- BOOST_CONCEPT_USAGE(BasicLockable)
- {
- l.lock();
- l.unlock();
- }
- BasicLockable() : l(*static_cast<Mutex*>(0)) {}
- private:
- BasicLockable operator=(BasicLockable const&);
-
- Mutex& l;
- }
- ;
- //]
- /**
- * Lockable extends BasicLockable
- * with try_lock functions.
- */
-
- //[Lockable
- template <typename Mutex>
- struct Lockable
- {
- BOOST_CONCEPT_ASSERT(( BasicLockable<Mutex> ));
-
- BOOST_CONCEPT_USAGE(Lockable)
- {
- if (l.try_lock()) return;
- }
- Lockable() : l(*static_cast<Mutex*>(0)) {}
- private:
- Lockable operator=(Lockable const&);
- Mutex& l;
- };
- //]
-
- /**
- * TimedLockable object extends Lockable
- * with timed lock functions: try_lock_until and try_lock_for and the exception based lock_until and lock_for
- */
-
- //[TimedLockable
- template <typename Mutex>
- struct TimedLockable
- {
- BOOST_CONCEPT_ASSERT(( Lockable<Mutex> ));
-
- BOOST_CONCEPT_USAGE(TimedLockable)
- {
- if (l.try_lock_until(t)) return;
- if (l.try_lock_for(d)) return;
- }
- TimedLockable() : l(*static_cast<Mutex*>(0)) {}
- private:
- TimedLockable operator=(TimedLockable const&);
- Mutex& l;
- chrono::system_clock::time_point t;
- chrono::system_clock::duration d;
- };
- //]
-
- /**
- * SharedLockable object extends TimedLockable
- * with the lock_shared, lock_shared_until, lock_shared_for, try_lock_shared_until, try_lock_shared
- * and unlock_shared functions
- */
- //[SharedLockable
- template <typename Mutex>
- struct SharedLockable
- {
- BOOST_CONCEPT_ASSERT(( TimedLockable<Mutex> ));
-
- BOOST_CONCEPT_USAGE(SharedLockable)
- {
- l.lock_shared();
- l.unlock_shared();
- if (l.try_lock_shared()) return;
- if (l.try_lock_shared_until(t)) return;
- if (l.try_lock_shared_for(d)) return;
- }
- SharedLockable() : l(*static_cast<Mutex*>(0)) {}
- private:
- SharedLockable operator=(SharedLockable const&);
- Mutex& l;
- chrono::system_clock::time_point t;
- chrono::system_clock::duration d;
- };
- //]
-
- /**
- * UpgradeLockable object extends SharedLockable
- * with the lock_upgrade, lock_upgrade_until, unlock_upgrade_and_lock,
- * unlock_and_lock_shared and unlock_upgrade_and_lock_shared functions
- */
-
- //[UpgradeLockable
- template <typename Mutex>
- struct UpgradeLockable
- {
- BOOST_CONCEPT_ASSERT(( SharedLockable<Mutex> ));
-
- BOOST_CONCEPT_USAGE(UpgradeLockable)
- {
- l.lock_upgrade();
- l.unlock_upgrade();
- if (l.try_lock_upgrade()) return;
- if (l.try_lock_upgrade_until(t)) return;
- if (l.try_lock_upgrade_for(d)) return;
- if (l.try_unlock_shared_and_lock()) return;
- if (l.try_unlock_shared_and_lock_until(t)) return;
- if (l.try_unlock_shared_and_lock_for(d)) return;
- l.unlock_and_lock_shared();
- if (l.try_unlock_shared_and_lock_upgrade()) return;
- if (l.try_unlock_shared_and_lock_upgrade_until(t)) return;
- if (l.try_unlock_shared_and_lock_upgrade_for(d)) return;
- l.unlock_and_lock_upgrade();
- l.unlock_upgrade_and_lock();
- if (l.try_unlock_upgrade_and_lock()) return;
- if (l.try_unlock_upgrade_and_lock_until(t)) return;
- if (l.try_unlock_upgrade_and_lock_for(d)) return;
- l.unlock_upgrade_and_lock_shared();
- }
- UpgradeLockable() : l(*static_cast<Mutex*>(0)) {}
- private:
- UpgradeLockable operator=(UpgradeLockable const&);
- Mutex& l;
- chrono::system_clock::time_point t;
- chrono::system_clock::duration d;
- };
- //]
-
-}
-#endif
diff --git a/contrib/restricted/boost/boost/thread/null_mutex.hpp b/contrib/restricted/boost/boost/thread/null_mutex.hpp
deleted file mode 100644
index f439f9ffb2..0000000000
--- a/contrib/restricted/boost/boost/thread/null_mutex.hpp
+++ /dev/null
@@ -1,243 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_THREAD_NULL_MUTEX_HPP
-#define BOOST_THREAD_NULL_MUTEX_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/chrono/chrono.hpp>
-
-/// \file
-/// Describes null_mutex class
-
-namespace boost
-{
-
- /// Implements a mutex that simulates a mutex without doing any operation and
- /// simulates a successful operation.
- class null_mutex
- {
- public:
-
- BOOST_THREAD_NO_COPYABLE( null_mutex) /*< no copyable >*/
-
- null_mutex() {}
-
- /// Simulates a mutex lock() operation. Empty function.
- void lock()
- {
- }
-
- /// Simulates a mutex try_lock() operation.
- /// Equivalent to "return true;"
- bool try_lock()
- {
- return true;
- }
-
- /// Simulates a mutex unlock() operation.
- /// Empty function.
- void unlock()
- {
- }
-
-#ifdef BOOST_THREAD_USES_CHRONO
- /// Simulates a mutex try_lock_until() operation.
- /// Equivalent to "return true;"
- template <typename Clock, typename Duration>
- bool try_lock_until(chrono::time_point<Clock, Duration> const &)
- {
- return true;
- }
-
- /// Simulates a mutex try_lock_for() operation.
- /// Equivalent to "return true;"
- template <typename Rep, typename Period>
- bool try_lock_for(chrono::duration<Rep, Period> const &)
- {
- return true;
- }
-#endif
-
- /// Simulates a mutex lock_shared() operation.
- /// Empty function.
- void lock_shared()
- {
- }
-
- /// Simulates a mutex try_lock_shared() operation.
- /// Equivalent to "return true;"
- bool try_lock_shared()
- {
- return true;
- }
-
- /// Simulates a mutex unlock_shared() operation.
- /// Empty function.
- void unlock_shared()
- {
- }
-
- /// Simulates a mutex try_lock_shared_until() operation.
- /// Equivalent to "return true;"
- template <typename Clock, typename Duration>
- bool try_lock_shared_until(chrono::time_point<Clock, Duration> const &)
- {
- return true;
- }
- /// Simulates a mutex try_lock_shared_for() operation.
- /// Equivalent to "return true;"
- template <typename Rep, typename Period>
- bool try_lock_shared_for(chrono::duration<Rep, Period> const &)
- {
- return true;
- }
-
- /// Simulates a mutex lock_upgrade() operation.
- /// Empty function.
- void lock_upgrade()
- {
- }
-
- /// Simulates a mutex try_lock_upgrade() operation.
- /// Equivalent to "return true;"
- bool try_lock_upgrade()
- {
- return true;
- }
-
- /// Simulates a mutex unlock_upgrade() operation.
- /// Empty function.
- void unlock_upgrade()
- {
- }
-
- /// Simulates a mutex try_lock_upgrade_until() operation.
- /// Equivalent to "return true;"
- template <typename Clock, typename Duration>
- bool try_lock_upgrade_until(chrono::time_point<Clock, Duration> const &)
- {
- return true;
- }
-
- /// Simulates a mutex try_lock_upgrade_for() operation.
- /// Equivalent to "return true;"
- template <typename Rep, typename Period>
- bool try_lock_upgrade_for(chrono::duration<Rep, Period> const &)
- {
- return true;
- }
-
- /// Simulates a mutex try_unlock_shared_and_lock() operation.
- /// Equivalent to "return true;"
- bool try_unlock_shared_and_lock()
- {
- return true;
- }
-
-#ifdef BOOST_THREAD_USES_CHRONO
- /// Simulates a mutex try_unlock_shared_and_lock_until() operation.
- /// Equivalent to "return true;"
- template <typename Clock, typename Duration>
- bool try_unlock_shared_and_lock_until(chrono::time_point<Clock, Duration> const &)
- {
- return true;
- }
-
- /// Simulates a mutex try_unlock_shared_and_lock_for() operation.
- /// Equivalent to "return true;"
- template <typename Rep, typename Period>
- bool try_unlock_shared_and_lock_for(chrono::duration<Rep, Period> const &)
- {
- return true;
- }
-#endif
-
- /// Simulates unlock_and_lock_shared().
- /// Empty function.
- void unlock_and_lock_shared()
- {
- }
-
- /// Simulates a mutex try_unlock_shared_and_lock_upgrade() operation.
- /// Equivalent to "return true;"
- bool try_unlock_shared_and_lock_upgrade()
- {
- return true;
- }
-
-#ifdef BOOST_THREAD_USES_CHRONO
- /// Simulates a mutex try_unlock_shared_and_lock_upgrade_until() operation.
- /// Equivalent to "return true;"
- template <typename Clock, typename Duration>
- bool try_unlock_shared_and_lock_upgrade_until(chrono::time_point<Clock, Duration> const &)
- {
- return true;
- }
-
- /// Simulates a mutex try_unlock_shared_and_lock_upgrade_for() operation.
- /// Equivalent to "return true;"
- template <typename Rep, typename Period>
- bool try_unlock_shared_and_lock_upgrade_for(chrono::duration<Rep, Period> const &)
- {
- return true;
- }
-#endif
-
- /// Simulates unlock_and_lock_upgrade().
- /// Empty function.
- void unlock_and_lock_upgrade()
- {
- }
-
- /// Simulates unlock_upgrade_and_lock().
- /// Empty function.
- void unlock_upgrade_and_lock()
- {
- }
-
- /// Simulates a mutex try_unlock_upgrade_and_lock() operation.
- /// Equivalent to "return true;"
- bool try_unlock_upgrade_and_lock()
- {
- return true;
- }
-
-#ifdef BOOST_THREAD_USES_CHRONO
- /// Simulates a mutex try_unlock_upgrade_and_lock_until() operation.
- /// Equivalent to "return true;"
- template <typename Clock, typename Duration>
- bool try_unlock_upgrade_and_lock_until(chrono::time_point<Clock, Duration> const &)
- {
- return true;
- }
-
- /// Simulates a mutex try_unlock_upgrade_and_lock_for() operation.
- /// Equivalent to "return true;"
- template <typename Rep, typename Period>
- bool try_unlock_upgrade_and_lock_for(chrono::duration<Rep, Period> const &)
- {
- return true;
- }
-#endif
-
- /// Simulates unlock_upgrade_and_lock_shared().
- /// Empty function.
- void unlock_upgrade_and_lock_shared()
- {
- }
-
- };
-
-} //namespace boost {
-
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/ostream_buffer.hpp b/contrib/restricted/boost/boost/thread/ostream_buffer.hpp
deleted file mode 100644
index cc02a9c0ce..0000000000
--- a/contrib/restricted/boost/boost/thread/ostream_buffer.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// (C) Copyright 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)
-
-
-#ifndef BOOST_THREAD_OSTREAM_BUFFER_HPP
-#define BOOST_THREAD_OSTREAM_BUFFER_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <sstream>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
- template <typename OStream>
- class ostream_buffer
- {
- public:
- typedef std::basic_ostringstream<typename OStream::char_type, typename OStream::traits_type> stream_type;
- ostream_buffer(OStream& os) :
- os_(os)
- {
- }
- ~ostream_buffer()
- {
- os_ << o_str_.str();
- }
- stream_type& stream()
- {
- return o_str_;
- }
- private:
- OStream& os_;
- stream_type o_str_;
- };
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/poly_lockable.hpp b/contrib/restricted/boost/boost/thread/poly_lockable.hpp
deleted file mode 100644
index fffcbce133..0000000000
--- a/contrib/restricted/boost/boost/thread/poly_lockable.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_THREAD_POLY_LOCKABLE_HPP
-#define BOOST_THREAD_POLY_LOCKABLE_HPP
-
-#include <boost/thread/detail/delete.hpp>
-#include <boost/chrono/chrono.hpp>
-
-namespace boost
-{
-
- //[basic_poly_lockable
- class basic_poly_lockable
- {
- public:
-
- virtual ~basic_poly_lockable() = 0;
-
- virtual void lock() = 0;
- virtual void unlock() = 0;
-
- };
- //]
-
- //[poly_lockable
- class poly_lockable : public basic_poly_lockable
- {
- public:
-
- virtual ~poly_lockable() = 0;
- virtual bool try_lock() = 0;
- };
- //]
-
- //[timed_poly_lockable
- class timed_poly_lockable: public poly_lockable
- {
- public:
- virtual ~timed_poly_lockable()=0;
-
- virtual bool try_lock_until(chrono::system_clock::time_point const & abs_time)=0;
- virtual bool try_lock_until(chrono::steady_clock::time_point const & abs_time)=0;
- template <typename Clock, typename Duration>
- bool try_lock_until(chrono::time_point<Clock, Duration> const & abs_time)
- {
- return try_lock_until(time_point_cast<Clock::time_point>(abs_time));
- }
-
- virtual bool try_lock_for(chrono::nanoseconds const & relative_time)=0;
- template <typename Rep, typename Period>
- bool try_lock_for(chrono::duration<Rep, Period> const & rel_time)
- {
- return try_lock_for(duration_cast<Clock::duration>(rel_time));
- }
-
- };
- //]
-
-}
-#endif
diff --git a/contrib/restricted/boost/boost/thread/poly_lockable_adapter.hpp b/contrib/restricted/boost/boost/thread/poly_lockable_adapter.hpp
deleted file mode 100644
index 448789ecbc..0000000000
--- a/contrib/restricted/boost/boost/thread/poly_lockable_adapter.hpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_THREAD_POLY_LOCKABLE_ADAPTER_HPP
-#define BOOST_THREAD_POLY_LOCKABLE_ADAPTER_HPP
-
-#include <boost/thread/poly_lockable.hpp>
-
-namespace boost
-{
-
- //[poly_basic_lockable_adapter
- template <typename Mutex, typename Base=poly_basic_lockable>
- class poly_basic_lockable_adapter : public Base
- {
- public:
- typedef Mutex mutex_type;
-
- protected:
- mutex_type& mtx() const
- {
- return mtx_;
- }
- mutable mutex_type mtx_; /*< mutable so that it can be modified by const functions >*/
- public:
-
- BOOST_THREAD_NO_COPYABLE( poly_basic_lockable_adapter) /*< no copyable >*/
-
- poly_basic_lockable_adapter()
- {}
-
- void lock()
- {
- mtx().lock();
- }
- void unlock()
- {
- mtx().unlock();
- }
-
- };
- //]
-
- //[poly_lockable_adapter
- template <typename Mutex, typename Base=poly_lockable>
- class poly_lockable_adapter : public poly_basic_lockable_adapter<Mutex, Base>
- {
- public:
- typedef Mutex mutex_type;
-
- bool try_lock()
- {
- return this->mtx().try_lock();
- }
- };
- //]
-
- //[poly_timed_lockable_adapter
- template <typename Mutex, typename Base=poly_timed_lockable>
- class poly_timed_lockable_adapter: public poly_lockable_adapter<Mutex, Base>
- {
- public:
- typedef Mutex mutex_type;
-
- bool try_lock_until(chrono::system_clock::time_point const & abs_time)
- {
- return this->mtx().try_lock_until(abs_time);
- }
- bool try_lock_until(chrono::steady_clock::time_point const & abs_time)
- {
- return this->mtx().try_lock_until(abs_time);
- }
- bool try_lock_for(chrono::nanoseconds const & rel_time)
- {
- return this->mtx().try_lock_for(rel_time);
- }
-
- };
- //]
-
-}
-#endif
diff --git a/contrib/restricted/boost/boost/thread/poly_shared_lockable.hpp b/contrib/restricted/boost/boost/thread/poly_shared_lockable.hpp
deleted file mode 100644
index 4348ed76c2..0000000000
--- a/contrib/restricted/boost/boost/thread/poly_shared_lockable.hpp
+++ /dev/null
@@ -1,135 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_THREAD_POLY_SHARED_LOCKABLE_HPP
-#define BOOST_THREAD_POLY_SHARED_LOCKABLE_HPP
-
-#include <boost/thread/poly_lockable.hpp>
-#include <boost/chrono/chrono.hpp>
-
-namespace boost
-{
-
-
- //[shared_poly_lockable
- class shared_poly_lockable: public timed_poly_lockable
- {
- public:
- virtual ~shared_poly_lockable() = 0;
-
- virtual void lock_shared() = 0;
- virtual bool try_lock_shared() = 0;
- virtual void unlock_shared() = 0;
-
- virtual bool try_lock_shared_until(chrono::system_clock::time_point const & abs_time)=0;
- virtual bool try_lock_shared_until(chrono::steady_clock::time_point const & abs_time)=0;
- template <typename Clock, typename Duration>
- bool try_lock_shared_until(chrono::time_point<Clock, Duration> const & abs_time)
- {
- return try_lock_shared_until(time_point_cast<Clock::time_point>(abs_time));
- }
-
- virtual bool try_lock_shared_for(chrono::nanoseconds const & relative_time)=0;
- template <typename Rep, typename Period>
- bool try_lock_shared_for(chrono::duration<Rep, Period> const & rel_time)
- {
- return try_lock_shared_for(duration_cast<Clock::duration>(rel_time));
- }
-
- };
-
- //]
-
- //[upgrade_poly_lockable
- class upgrade_poly_lockable: public shared_poly_lockable
- {
- public:
- virtual ~upgrade_poly_lockable() = 0;
-
- virtual void lock_upgrade() = 0;
- virtual bool try_lock_upgrade() = 0;
- virtual void unlock_upgrade() = 0;
-
- virtual bool try_lock_upgrade_until(chrono::system_clock::time_point const & abs_time)=0;
- virtual bool try_lock_upgrade_until(chrono::steady_clock::time_point const & abs_time)=0;
- template <typename Clock, typename Duration>
- bool try_lock_upgrade_until(chrono::time_point<Clock, Duration> const & abs_time)
- {
- return try_lock_upgrade_until(time_point_cast<Clock::time_point>(abs_time));
- }
-
- virtual bool try_lock_upgrade_for(chrono::nanoseconds const & relative_time)=0;
- template <typename Rep, typename Period>
- bool try_lock_upgrade_for(chrono::duration<Rep, Period> const & rel_time)
- {
- return try_lock_upgrade_for(duration_cast<Clock::duration>(rel_time));
- }
-
- virtual bool try_unlock_shared_and_lock() = 0;
-
- virtual bool try_unlock_shared_and_lock_until(chrono::system_clock::time_point const & abs_time)=0;
- virtual bool try_unlock_shared_and_lock_until(chrono::steady_clock::time_point const & abs_time)=0;
- template <typename Clock, typename Duration>
- bool try_unlock_shared_and_lock_until(chrono::time_point<Clock, Duration> const & abs_time)
- {
- return try_unlock_shared_and_lock_until(time_point_cast<Clock::time_point>(abs_time));
- }
-
- virtual bool try_unlock_shared_and_lock_for(chrono::nanoseconds const & relative_time)=0;
- template <typename Rep, typename Period>
- bool try_unlock_shared_and_lock_for(chrono::duration<Rep, Period> const & rel_time)
- {
- return try_unlock_shared_and_lock_for(duration_cast<Clock::duration>(rel_time));
- }
-
- virtual void unlock_and_lock_shared() = 0;
- virtual bool try_unlock_shared_and_lock_upgrade() = 0;
-
- virtual bool try_unlock_shared_and_lock_upgrade_until(chrono::system_clock::time_point const & abs_time)=0;
- virtual bool try_unlock_shared_and_lock_upgrade_until(chrono::steady_clock::time_point const & abs_time)=0;
- template <typename Clock, typename Duration>
- bool try_unlock_shared_and_lock_upgrade_until(chrono::time_point<Clock, Duration> const & abs_time)
- {
- return try_unlock_shared_and_lock_upgrade_until(time_point_cast<Clock::time_point>(abs_time));
- }
-
- virtual bool try_unlock_shared_and_lock_upgrade_for(chrono::nanoseconds const & relative_time)=0;
- template <typename Rep, typename Period>
- bool try_unlock_shared_and_lock_upgrade_for(chrono::duration<Rep, Period> const & rel_time)
- {
- return try_unlock_shared_and_lock_upgrade_for(duration_cast<Clock::duration>(rel_time));
- }
-
- virtual void unlock_and_lock_upgrade() = 0;
- virtual void unlock_upgrade_and_lock() = 0;
- virtual bool try_unlock_upgrade_and_lock() = 0;
-
- virtual bool try_unlock_upgrade_and_lock_until(chrono::system_clock::time_point const & abs_time)=0;
- virtual bool try_unlock_upgrade_and_lock_until(chrono::steady_clock::time_point const & abs_time)=0;
- template <typename Clock, typename Duration>
- bool try_unlock_upgrade_and_lock_until(chrono::time_point<Clock, Duration> const & abs_time)
- {
- return try_unlock_upgrade_and_lock_until(time_point_cast<Clock::time_point>(abs_time));
- }
-
- virtual bool try_unlock_upgrade_and_lock_for(chrono::nanoseconds const & relative_time)=0;
- template <typename Rep, typename Period>
- bool try_unlock_upgrade_and_lock_for(chrono::duration<Rep, Period> const & rel_time)
- {
- return try_unlock_upgrade_and_lock_for(duration_cast<Clock::duration>(rel_time));
- }
-
- virtual void unlock_upgrade_and_lock_shared() = 0;
-
- };
-//]
-
-}
-#endif
diff --git a/contrib/restricted/boost/boost/thread/poly_shared_lockable_adapter.hpp b/contrib/restricted/boost/boost/thread/poly_shared_lockable_adapter.hpp
deleted file mode 100644
index f136128907..0000000000
--- a/contrib/restricted/boost/boost/thread/poly_shared_lockable_adapter.hpp
+++ /dev/null
@@ -1,170 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_THREAD_POLY_SHARED_LOCKABLE_ADAPTER_HPP
-#define BOOST_THREAD_POLY_SHARED_LOCKABLE_ADAPTER_HPP
-
-#include <boost/thread/poly_lockable_adapter.hpp>
-#include <boost/thread/poly_shared_lockable.hpp>
-
-namespace boost
-{
-
- //[shared_lockable_adapter
- template <typename Mutex, typename Base=poly_shared_lockable>
- class poly_shared_lockable_adapter: public poly_timed_lockable_adapter<Mutex, Base>
- {
- public:
- typedef Mutex mutex_type;
-
- void lock_shared()
- {
- this->mtx().lock_shared();
- }
- bool try_lock_shared()
- {
- return this->mtx().try_lock_shared();
- }
- void unlock_shared()
- {
- this->mtx().unlock_shared();
- }
-
- bool try_lock_shared_until(chrono::system_clock::time_point const & abs_time)
- {
- return this->mtx().try_lock_shared_until(abs_time);
- }
- bool try_lock_shared_until(chrono::steady_clock::time_point const & abs_time)
- {
- return this->mtx().try_lock_shared_until(abs_time);
- }
- bool try_lock_shared_for(chrono::nanoseconds const & rel_time)
- {
- return this->mtx().try_lock_shared_for(rel_time);
- }
-
- };
-
- //]
-
- //[upgrade_lockable_adapter
- template <typename Mutex, typename Base=poly_shared_lockable>
- class upgrade_lockable_adapter: public shared_lockable_adapter<Mutex, Base>
- {
- public:
- typedef Mutex mutex_type;
-
- void lock_upgrade()
- {
- this->mtx().lock_upgrade();
- }
-
- bool try_lock_upgrade()
- {
- return this->mtx().try_lock_upgrade();
- }
-
- void unlock_upgrade()
- {
- this->mtx().unlock_upgrade();
- }
-
- bool try_lock_upgrade_until(chrono::system_clock::time_point const & abs_time)
- {
- return this->mtx().try_lock_upgrade_until(abs_time);
- }
- bool try_lock_upgrade_until(chrono::steady_clock::time_point const & abs_time)
- {
- return this->mtx().try_lock_upgrade_until(abs_time);
- }
- bool try_lock_upgrade_for(chrono::nanoseconds const & rel_time)
- {
- return this->mtx().try_lock_upgrade_for(rel_time);
- }
-
- bool try_unlock_shared_and_lock()
- {
- return this->mtx().try_unlock_shared_and_lock();
- }
-
- bool try_unlock_shared_and_lock_until(chrono::system_clock::time_point const & abs_time)
- {
- return this->mtx().try_unlock_shared_and_lock_until(abs_time);
- }
- bool try_unlock_shared_and_lock_until(chrono::steady_clock::time_point const & abs_time)
- {
- return this->mtx().try_unlock_shared_and_lock_until(abs_time);
- }
- template <typename Rep, typename Period>
- bool try_unlock_shared_and_lock_for(chrono::nanoseconds const & rel_time)
- {
- return this->mtx().try_unlock_shared_and_lock_for(rel_time);
- }
-
- void unlock_and_lock_shared()
- {
- this->mtx().unlock_and_lock_shared();
- }
-
- bool try_unlock_shared_and_lock_upgrade()
- {
- return this->mtx().try_unlock_shared_and_lock_upgrade();
- }
-
- bool try_unlock_shared_and_lock_upgrade_until(chrono::system_clock::time_point const & abs_time)
- {
- return this->mtx().try_unlock_shared_and_lock_upgrade_until(abs_time);
- }
- bool try_unlock_shared_and_lock_upgrade_until(chrono::steady_clock::time_point const & abs_time)
- {
- return this->mtx().try_unlock_shared_and_lock_upgrade_until(abs_time);
- }
- bool try_unlock_shared_and_lock_upgrade_for(chrono::nanoseconds const & rel_time)
- {
- return this->mtx().try_unlock_shared_and_lock_upgrade_for(rel_time);
- }
-
- void unlock_and_lock_upgrade()
- {
- this->mtx().unlock_and_lock_upgrade();
- }
-
- void unlock_upgrade_and_lock()
- {
- this->mtx().unlock_upgrade_and_lock();
- }
-
- bool try_unlock_upgrade_and_lock()
- {
- return this->mtx().try_unlock_upgrade_and_lock();
- }
- bool try_unlock_upgrade_and_lock_until(chrono::system_clock::time_point const & abs_time)
- {
- return this->mtx().try_unlock_upgrade_and_lock_until(abs_time);
- }
- bool try_unlock_upgrade_and_lock_until(chrono::steady_clock::time_point const & abs_time)
- {
- return this->mtx().try_unlock_upgrade_and_lock_until(abs_time);
- }
- bool try_unlock_upgrade_and_lock_for(chrono::nanoseconds const & rel_time)
- {
- return this->mtx().try_unlock_upgrade_and_lock_for(rel_time);
- }
-
- void unlock_upgrade_and_lock_shared()
- {
- this->mtx().unlock_upgrade_and_lock_shared();
- }
-
- };
-//]
-
-}
-#endif
diff --git a/contrib/restricted/boost/boost/thread/reverse_lock.hpp b/contrib/restricted/boost/boost/thread/reverse_lock.hpp
deleted file mode 100644
index 479c314bdb..0000000000
--- a/contrib/restricted/boost/boost/thread/reverse_lock.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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)
-// (C) Copyright 2012 Vicente J. Botet Escriba
-
-#ifndef BOOST_THREAD_REVERSE_LOCK_HPP
-#define BOOST_THREAD_REVERSE_LOCK_HPP
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/lockable_traits.hpp>
-#include <boost/thread/lock_options.hpp>
-#include <boost/thread/detail/delete.hpp>
-
-namespace boost
-{
-
- template<typename Lock>
- class reverse_lock
- {
- public:
- typedef typename Lock::mutex_type mutex_type;
- BOOST_THREAD_NO_COPYABLE(reverse_lock)
-
- explicit reverse_lock(Lock& m_)
- : m(m_), mtx(0)
- {
- if (m.owns_lock())
- {
- m.unlock();
- }
- mtx=m.release();
- }
- ~reverse_lock()
- {
- if (mtx) {
- mtx->lock();
- m = BOOST_THREAD_MAKE_RV_REF(Lock(*mtx, adopt_lock));
- }
- }
-
- private:
- Lock& m;
- mutex_type* mtx;
- };
-
-
-#ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
- template<typename T>
- struct is_mutex_type<reverse_lock<T> >
- {
- BOOST_STATIC_CONSTANT(bool, value = true);
- };
-
-#endif
-
-
-}
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/scoped_thread.hpp b/contrib/restricted/boost/boost/thread/scoped_thread.hpp
deleted file mode 100644
index 6cda931a5f..0000000000
--- a/contrib/restricted/boost/boost/thread/scoped_thread.hpp
+++ /dev/null
@@ -1,294 +0,0 @@
-// 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)
-// (C) Copyright 2009-2012 Anthony Williams
-// (C) Copyright 2012 Vicente J. Botet Escriba
-
-// Based on the Anthony's idea of scoped_thread in CCiA
-
-#ifndef BOOST_THREAD_SCOPED_THREAD_HPP
-#define BOOST_THREAD_SCOPED_THREAD_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/thread_functors.hpp>
-#include <boost/thread/thread_only.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
- /**
- * RAI @c thread wrapper adding a specific destroyer allowing to master what can be done at destruction time.
- *
- * CallableThread: A callable void(thread&) .
- * The default is a join_if_joinable.
- *
- * thread std/boost::thread destructor terminates the program if the thread is not joinable.
- * Having a wrapper that can join the thread before destroying it seems a natural need.
- *
- * Example:
- *
- * boost::strict_scoped_thread<> t((boost::thread(F)));
- *
- */
- template <class CallableThread = join_if_joinable, class Thread=::boost::thread>
- class strict_scoped_thread
- {
- Thread t_;
- struct dummy;
- public:
-
- BOOST_THREAD_NO_COPYABLE( strict_scoped_thread) /// non copyable
-
- /*
- *
- */
-#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- template <class F, class ...Args, typename = typename disable_if<is_same<typename decay<F>::type, Thread>, void* >::type>
- explicit strict_scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(Args)... args) :
- t_(boost::forward<F>(f), boost::forward<Args>(args)...) {}
-#else
- template <class F>
- explicit strict_scoped_thread(BOOST_THREAD_FWD_REF(F) f,
- typename disable_if<is_same<typename decay<F>::type, Thread>, void* >::type=0) :
- t_(boost::forward<F>(f)) {}
- template <class F, class A1>
- strict_scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1) :
- t_(boost::forward<F>(f), boost::forward<A1>(a1)) {}
- template <class F, class A1, class A2>
- strict_scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1, BOOST_THREAD_FWD_REF(A2) a2) :
- t_(boost::forward<F>(f), boost::forward<A1>(a1), boost::forward<A2>(a2)) {}
- template <class F, class A1, class A2, class A3>
- strict_scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1, BOOST_THREAD_FWD_REF(A2) a2, BOOST_THREAD_FWD_REF(A3) a3) :
- t_(boost::forward<F>(f), boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3)) {}
-#endif
-
- /**
- * Constructor from the thread to own.
- *
- * @param t: the thread to own.
- *
- * Effects: move the thread to own @c t.
- */
- explicit strict_scoped_thread(BOOST_THREAD_RV_REF(Thread) t) BOOST_NOEXCEPT :
- t_(boost::move(t))
- {
- }
-
- /**
- * Destructor
- * Effects: Call the CallableThread functor before destroying the owned thread.
- * Remark: The CallableThread should not throw when joining the thread as the scoped variable is on a scope outside the thread function.
- */
- ~strict_scoped_thread()
- {
- CallableThread on_destructor;
-
- on_destructor(t_);
- }
-
- };
-
- /**
- * RAI @c thread wrapper adding a specific destroyer allowing to master what can be done at destruction time.
- *
- * CallableThread: A callable void(thread&) .
- * The default is join_if_joinable.
- *
- * thread std::thread destructor terminates the program if the thread is not joinable.
- * Having a wrapper that can join the thread before destroying it seems a natural need.
- *
- * Remark: @c scoped_thread is not a @c thread as @c thread is not designed to be derived from as a polymorphic type.
- * Anyway @c scoped_thread can be used in most of the contexts a @c thread could be used as it has the
- * same non-deprecated interface with the exception of the construction.
- *
- * Example:
- *
- * boost::scoped_thread<> t((boost::thread(F)));
- * t.interrupt();
- *
- */
- template <class CallableThread = join_if_joinable, class Thread=::boost::thread>
- class scoped_thread
- {
- Thread t_;
- struct dummy;
- public:
-
- typedef typename Thread::id id;
- typedef typename Thread::native_handle_type native_handle_type;
-
- BOOST_THREAD_MOVABLE_ONLY( scoped_thread) /// Movable only
-
- /**
- * Default Constructor.
- *
- * Effects: wraps a not-a-thread.
- */
- scoped_thread() BOOST_NOEXCEPT:
- t_()
- {
- }
-
- /**
- *
- */
-
-#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- template <class F, class ...Args, typename = typename disable_if<is_same<typename decay<F>::type, Thread>, void* >::type>
- explicit scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(Args)... args) :
- t_(boost::forward<F>(f), boost::forward<Args>(args)...) {}
-#else
- template <class F>
- explicit scoped_thread(BOOST_THREAD_FWD_REF(F) f,
- typename disable_if<is_same<typename decay<F>::type, Thread>, void* >::type=0) :
- t_(boost::forward<F>(f)) {}
- template <class F, class A1>
- scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1) :
- t_(boost::forward<F>(f), boost::forward<A1>(a1)) {}
- template <class F, class A1, class A2>
- scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1, BOOST_THREAD_FWD_REF(A2) a2) :
- t_(boost::forward<F>(f), boost::forward<A1>(a1), boost::forward<A2>(a2)) {}
- template <class F, class A1, class A2, class A3>
- scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1, BOOST_THREAD_FWD_REF(A2) a2, BOOST_THREAD_FWD_REF(A3) a3) :
- t_(boost::forward<F>(f), boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3)) {}
-
-#endif
- /**
- * Constructor from the thread to own.
- *
- * @param t: the thread to own.
- *
- * Effects: move the thread to own @c t.
- */
- explicit scoped_thread(BOOST_THREAD_RV_REF(Thread) t) BOOST_NOEXCEPT :
- t_(boost::move(t))
- {
- }
-
-// explicit operator Thread()
-// {
-// return boost::move(t_);
-// }
-
- /**
- * Move constructor.
- */
- scoped_thread(BOOST_RV_REF(scoped_thread) x) BOOST_NOEXCEPT :
- t_(boost::move(BOOST_THREAD_RV(x).t_))
- {}
-
- /**
- * Destructor
- *
- * Effects: Call the CallableThread functor before destroying the owned thread.
- */
- ~scoped_thread()
- {
- CallableThread on_destructor;
-
- on_destructor(t_);
- }
-
- /**
- * Move assignment.
- */
- scoped_thread& operator=(BOOST_RV_REF(scoped_thread) x)
- {
- CallableThread on_destructor;
-
- on_destructor(t_);
- t_ = boost::move(BOOST_THREAD_RV(x).t_);
- return *this;
- }
-
- /**
- *
- */
- void swap(scoped_thread& x) BOOST_NOEXCEPT
- {
- t_.swap(x.t_);
- }
-
- // forwarded thread functions
- inline id get_id() const BOOST_NOEXCEPT
- {
- return t_.get_id();
- }
-
- void detach()
- {
- t_.detach();
- }
-
- void join()
- {
- t_.join();
- }
-
-#ifdef BOOST_THREAD_USES_CHRONO
- template <class Rep, class Period>
- bool try_join_for(const chrono::duration<Rep, Period>& rel_time)
- {
- return t_.try_join_for(rel_time);
- }
-
- template <class Clock, class Duration>
- bool try_join_until(const chrono::time_point<Clock, Duration>& abs_time)
- {
- return t_.try_join_until(abs_time);
- }
-#endif
-
- native_handle_type native_handle()BOOST_NOEXCEPT
- {
- return t_.native_handle();
- }
-
- bool joinable() const BOOST_NOEXCEPT
- {
- return t_.joinable();
- }
-
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- void interrupt()
- {
- t_.interrupt();
- }
-
- bool interruption_requested() const BOOST_NOEXCEPT
- {
- return t_.interruption_requested();
- }
-#endif
-
- static unsigned hardware_concurrency() BOOST_NOEXCEPT
- {
- return Thread::hardware_concurrency();
- }
-
-#ifdef BOOST_THREAD_PROVIDES_PHYSICAL_CONCURRENCY
- static unsigned physical_concurrency() BOOST_NOEXCEPT
- {
- return Thread::physical_concurrency();
- }
-#endif
- };
-
- /**
- * Effects: swaps the contents of two scoped threads.
- */
- template <class Destroyer, class Thread >
- void swap(scoped_thread<Destroyer, Thread>& lhs, scoped_thread<Destroyer, Thread>& rhs)
-BOOST_NOEXCEPT {
- return lhs.swap(rhs);
-}
-
- typedef scoped_thread<> joining_thread;
-}
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/strict_lock.hpp b/contrib/restricted/boost/boost/thread/strict_lock.hpp
deleted file mode 100644
index 93b7b1e71c..0000000000
--- a/contrib/restricted/boost/boost/thread/strict_lock.hpp
+++ /dev/null
@@ -1,235 +0,0 @@
-// 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)
-// (C) Copyright 2008-2009,2012 Vicente J. Botet Escriba
-
-#ifndef BOOST_THREAD_STRICT_LOCK_HPP
-#define BOOST_THREAD_STRICT_LOCK_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/lockable_wrapper.hpp>
-#include <boost/thread/lock_options.hpp>
-#include <boost/thread/lock_traits.hpp>
-#include <boost/thread/lockable_traits.hpp>
-#include <boost/thread/lockable_concepts.hpp>
-#include <boost/thread/lock_concepts.hpp>
-#include <boost/thread/exceptions.hpp>
-#include <boost/throw_exception.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
-
- //[strict_lock
- template <typename Lockable>
- class strict_lock
- {
-
- BOOST_CONCEPT_ASSERT(( BasicLockable<Lockable> ));
- public:
- typedef Lockable mutex_type;
-
- // construct/copy/destroy:
-
- BOOST_THREAD_NO_COPYABLE( strict_lock)
-
- /**
- * Constructor from a mutex reference.
- *
- * @param mtx the mutex to lock.
- *
- * __Effects: Stores a reference to the mutex to lock and locks it.
- * __Throws: Any exception BasicMutex::lock() can throw.
- */
- explicit strict_lock(mutex_type& mtx) :
- mtx_(mtx)
- {
- mtx.lock();
- } /*< locks on construction >*/
-
-
-#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
- strict_lock(std::initializer_list<thread_detail::lockable_wrapper<Lockable> > l_) :
- mtx_(*(const_cast<thread_detail::lockable_wrapper<Lockable>*>(l_.begin())->m))
- {
- mtx_.lock();
- }
-#endif
-
- /**
- * Destructor
- *
- * __Effects: unlocks the stored mutex.
- *
- * __Throws
- */
- ~strict_lock()
- {
- mtx_.unlock();
- } /*< unlocks on destruction >*/
-
-
- // observers
-
- /**
- * @return the owned mutex.
- */
- mutex_type* mutex() const BOOST_NOEXCEPT
- {
- return &mtx_;
- }
-
- /**
- * @return whether this lock is locking a mutex.
- */
- bool owns_lock() const BOOST_NOEXCEPT
- {
- return true;
- }
-
- /**
- * @return whether this lock is locking that mutex.
- */
- bool owns_lock(const mutex_type* l) const BOOST_NOEXCEPT
- {
- return l == mutex();
- } /*< strict locks specific function >*/
-
- //BOOST_ADRESS_OF_DELETE(strict_lock) /*< disable aliasing >*/
- //BOOST_HEAP_ALLOCATION_DELETE(strict_lock) /*< disable heap allocation >*/
-
- /*< no possibility to unlock >*/
-
- private:
- mutex_type& mtx_;
- };
- //]
- template <typename Lockable>
- struct is_strict_lock_sur_parole<strict_lock<Lockable> > : true_type
- {
- };
-
- /**
- * A nested strict lock is a scoped lock guard ensuring the mutex is locked on its
- * scope, by taking ownership of an nesting lock, locking the mutex on construction if not already locked
- * and restoring the ownership to the nesting lock on destruction.
- */
- //[nested_strict_lock
- template <typename Lock>
- class nested_strict_lock
- {
- BOOST_CONCEPT_ASSERT(( BasicLock<Lock> )); /*< The Lock must be a movable lock >*/
- public:
- typedef typename Lock::mutex_type mutex_type; /*< Name the lockable type locked by Lock >*/
-
- BOOST_THREAD_NO_COPYABLE( nested_strict_lock)
-
- /**
- * Constructor from a nesting @c Lock.
- *
- * @param lk the nesting lock
- *
- * __Requires: <c>lk.mutex() != null_ptr</c>
- * __Effects: Stores the reference to the lock parameter and takes ownership on it.
- * If the lock doesn't owns the mutex @c mtx lock it.
- * __Postconditions: @c owns_lock(lk.mutex())
- * __StrongException
- * __Throws:
- *
- * - lock_error when BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is defined and lk.mutex() == null_ptr
- *
- * - Any exception that @c lk.lock() can throw.
- *
- */
- explicit nested_strict_lock(Lock& lk) :
- lk_(lk) /*< Store reference to lk >*/
- {
- /*< Define BOOST_THREAD_DONT_CHECK_PRECONDITIONS if you don't want to check lk ownership >*/
- BOOST_THREAD_ASSERT_PRECONDITION( lk.mutex() != 0,
- lock_error()
- );
- if (!lk.owns_lock()) lk.lock(); /*< ensures it is locked >*/
- tmp_lk_ = move(lk); /*< Move ownership to temporary lk >*/
- }
-
-#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
- nested_strict_lock(std::initializer_list<thread_detail::lockable_wrapper<Lock> > l_) :
- lk_(*(const_cast<thread_detail::lockable_wrapper<Lock>*>(l_.begin())->m))
- {
- /*< Define BOOST_THREAD_DONT_CHECK_PRECONDITIONS if you don't want to check lk ownership >*/
- BOOST_THREAD_ASSERT_PRECONDITION( lk_.mutex() != 0,
- lock_error()
- );
- if (!lk_.owns_lock()) lk_.lock(); /*< ensures it is locked >*/
- tmp_lk_ = move(lk_); /*< Move ownership to temporary lk >*/
- }
-#endif
-
- /**
- * Destructor
- *
- * __Effects: Restores ownership to the nesting lock.
- */
- ~nested_strict_lock()BOOST_NOEXCEPT
- {
- lk_ = move(tmp_lk_); /*< Move ownership to nesting lock >*/
- }
-
- // observers
- /**
- * return @c the owned mutex.
- */
- mutex_type* mutex() const BOOST_NOEXCEPT
- {
- return tmp_lk_.mutex();
- }
-
- /**
- * @return whether this lock is locking a mutex.
- */
- bool owns_lock() const BOOST_NOEXCEPT
- {
- return true;
- }
-
- /**
- * @return whether if this lock is locking that mutex.
- */
- bool owns_lock(mutex_type const* l) const BOOST_NOEXCEPT
- {
- return l == mutex();
- }
-
- //BOOST_ADRESS_OF_DELETE(nested_strict_lock)
- //BOOST_HEAP_ALLOCATEION_DELETE(nested_strict_lock)
-
- private:
- Lock& lk_;
- Lock tmp_lk_;
- };
- //]
-
- template <typename Lock>
- struct is_strict_lock_sur_parole<nested_strict_lock<Lock> > : true_type
- {
- };
-
-#if ! defined BOOST_THREAD_NO_MAKE_STRICT_LOCK
- template <typename Lockable>
- strict_lock<Lockable> make_strict_lock(Lockable& mtx)
- {
- return { thread_detail::lockable_wrapper<Lockable>(mtx) };
- }
- template <typename Lock>
- nested_strict_lock<Lock> make_nested_strict_lock(Lock& lk)
- {
- return { thread_detail::lockable_wrapper<Lock>(lk) };
- }
-#endif
-}
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/sync_bounded_queue.hpp b/contrib/restricted/boost/boost/thread/sync_bounded_queue.hpp
deleted file mode 100644
index 2024d6602e..0000000000
--- a/contrib/restricted/boost/boost/thread/sync_bounded_queue.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef BOOST_THREAD_SYNC_BOUNDED_QUEUE_HPP
-#define BOOST_THREAD_SYNC_BOUNDED_QUEUE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2013-2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/concurrent_queues/sync_bounded_queue.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/sync_queue.hpp b/contrib/restricted/boost/boost/thread/sync_queue.hpp
deleted file mode 100644
index 0d9334b478..0000000000
--- a/contrib/restricted/boost/boost/thread/sync_queue.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef BOOST_THREAD_SYNC_QUEUE_HPP
-#define BOOST_THREAD_SYNC_QUEUE_HPP
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Vicente J. Botet Escriba 2013-2014. 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.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/thread/concurrent_queues/sync_queue.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/synchronized_value.hpp b/contrib/restricted/boost/boost/thread/synchronized_value.hpp
deleted file mode 100644
index 9068d7c424..0000000000
--- a/contrib/restricted/boost/boost/thread/synchronized_value.hpp
+++ /dev/null
@@ -1,1068 +0,0 @@
-// (C) Copyright 2010 Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
-// (C) Copyright 2012 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)
-
-
-#ifndef BOOST_THREAD_SYNCHRONIZED_VALUE_HPP
-#define BOOST_THREAD_SYNCHRONIZED_VALUE_HPP
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/lock_types.hpp>
-#include <boost/thread/lock_guard.hpp>
-#include <boost/thread/lock_algorithms.hpp>
-#include <boost/thread/lock_factories.hpp>
-#include <boost/thread/strict_lock.hpp>
-#include <boost/core/swap.hpp>
-#include <boost/utility/declval.hpp>
-//#include <boost/type_traits.hpp>
-//#include <boost/thread/detail/is_nothrow_default_constructible.hpp>
-//#if ! defined BOOST_NO_CXX11_HDR_TYPE_TRAITS
-//#include <type_traits>
-//#endif
-
-#if ! defined(BOOST_THREAD_NO_SYNCHRONIZE)
-#include <tuple> // todo change to <boost/tuple.hpp> once Boost.Tuple or Boost.Fusion provides Move semantics on C++98 compilers.
-#include <functional>
-#endif
-
-#include <boost/utility/result_of.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
- /**
- * strict lock providing a const pointer access to the synchronized value type.
- *
- * @param T the value type.
- * @param Lockable the mutex type protecting the value type.
- */
- template <typename T, typename Lockable = mutex>
- class const_strict_lock_ptr
- {
- public:
- typedef T value_type;
- typedef Lockable mutex_type;
- protected:
-
- // this should be a strict_lock, but unique_lock is needed to be able to return it.
- boost::unique_lock<mutex_type> lk_;
- T const& value_;
-
- public:
- BOOST_THREAD_MOVABLE_ONLY( const_strict_lock_ptr )
-
- /**
- * @param value constant reference of the value to protect.
- * @param mtx reference to the mutex used to protect the value.
- * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value.
- */
- const_strict_lock_ptr(T const& val, Lockable & mtx) :
- lk_(mtx), value_(val)
- {
- }
- const_strict_lock_ptr(T const& val, Lockable & mtx, adopt_lock_t tag) BOOST_NOEXCEPT :
- lk_(mtx, tag), value_(val)
- {
- }
- /**
- * Move constructor.
- * @effects takes ownership of the mutex owned by @c other, stores a reference to the mutex and the value type of @c other.
- */
- const_strict_lock_ptr(BOOST_THREAD_RV_REF(const_strict_lock_ptr) other) BOOST_NOEXCEPT
- : lk_(boost::move(BOOST_THREAD_RV(other).lk_)),value_(BOOST_THREAD_RV(other).value_)
- {
- }
-
- ~const_strict_lock_ptr()
- {
- }
-
- /**
- * @return a constant pointer to the protected value
- */
- const T* operator->() const
- {
- return &value_;
- }
-
- /**
- * @return a constant reference to the protected value
- */
- const T& operator*() const
- {
- return value_;
- }
-
- };
-
- /**
- * strict lock providing a pointer access to the synchronized value type.
- *
- * @param T the value type.
- * @param Lockable the mutex type protecting the value type.
- */
- template <typename T, typename Lockable = mutex>
- class strict_lock_ptr : public const_strict_lock_ptr<T,Lockable>
- {
- typedef const_strict_lock_ptr<T,Lockable> base_type;
- public:
- BOOST_THREAD_MOVABLE_ONLY( strict_lock_ptr )
-
- /**
- * @param value reference of the value to protect.
- * @param mtx reference to the mutex used to protect the value.
- * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value.
- */
- strict_lock_ptr(T & val, Lockable & mtx) :
- base_type(val, mtx)
- {
- }
- strict_lock_ptr(T & val, Lockable & mtx, adopt_lock_t tag) :
- base_type(val, mtx, tag)
- {
- }
-
- /**
- * Move constructor.
- * @effects takes ownership of the mutex owned by @c other, stores a reference to the mutex and the value type of @c other.
- */
- strict_lock_ptr(BOOST_THREAD_RV_REF(strict_lock_ptr) other)
- : base_type(boost::move(static_cast<base_type&>(other)))
- {
- }
-
- ~strict_lock_ptr()
- {
- }
-
- /**
- * @return a pointer to the protected value
- */
- T* operator->()
- {
- return const_cast<T*>(&this->value_);
- }
-
- /**
- * @return a reference to the protected value
- */
- T& operator*()
- {
- return const_cast<T&>(this->value_);
- }
-
- };
-
- template <typename SV>
- struct synchronized_value_strict_lock_ptr
- {
- typedef strict_lock_ptr<typename SV::value_type, typename SV::mutex_type> type;
- };
-
- template <typename SV>
- struct synchronized_value_strict_lock_ptr<const SV>
- {
- typedef const_strict_lock_ptr<typename SV::value_type, typename SV::mutex_type> type;
- };
- /**
- * unique_lock providing a const pointer access to the synchronized value type.
- *
- * An object of type const_unique_lock_ptr is a unique_lock that provides a const pointer access to the synchronized value type.
- * As unique_lock controls the ownership of a lockable object within a scope.
- * Ownership of the lockable object may be acquired at construction or after construction,
- * and may be transferred, after acquisition, to another const_unique_lock_ptr object.
- * Objects of type const_unique_lock_ptr are not copyable but are movable.
- * The behavior of a program is undefined if the mutex and the value type
- * pointed do not exist for the entire remaining lifetime of the const_unique_lock_ptr object.
- * The supplied Mutex type shall meet the BasicLockable requirements.
- *
- * @note const_unique_lock_ptr<T, Lockable> meets the Lockable requirements.
- * If Lockable meets the TimedLockable requirements, const_unique_lock_ptr<T,Lockable>
- * also meets the TimedLockable requirements.
- *
- * @param T the value type.
- * @param Lockable the mutex type protecting the value type.
- */
- template <typename T, typename Lockable = mutex>
- class const_unique_lock_ptr : public unique_lock<Lockable>
- {
- typedef unique_lock<Lockable> base_type;
- public:
- typedef T value_type;
- typedef Lockable mutex_type;
- protected:
- T const& value_;
-
- public:
- BOOST_THREAD_MOVABLE_ONLY(const_unique_lock_ptr)
-
- /**
- * @param value reference of the value to protect.
- * @param mtx reference to the mutex used to protect the value.
- *
- * @requires If mutex_type is not a recursive mutex the calling thread does not own the mutex.
- *
- * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value.
- */
- const_unique_lock_ptr(T const& val, Lockable & mtx)
- : base_type(mtx), value_(val)
- {
- }
- /**
- * @param value reference of the value to protect.
- * @param mtx reference to the mutex used to protect the value.
- * @param tag of type adopt_lock_t used to differentiate the constructor.
- * @requires The calling thread own the mutex.
- * @effects stores a reference to it and to the value type @c value taking ownership.
- */
- const_unique_lock_ptr(T const& val, Lockable & mtx, adopt_lock_t) BOOST_NOEXCEPT
- : base_type(mtx, adopt_lock), value_(val)
- {
- }
- /**
- * @param value reference of the value to protect.
- * @param mtx reference to the mutex used to protect the value.
- * @param tag of type defer_lock_t used to differentiate the constructor.
- * @effects stores a reference to it and to the value type @c value c.
- */
- const_unique_lock_ptr(T const& val, Lockable & mtx, defer_lock_t) BOOST_NOEXCEPT
- : base_type(mtx, defer_lock), value_(val)
- {
- }
- /**
- * @param value reference of the value to protect.
- * @param mtx reference to the mutex used to protect the value.
- * @param tag of type try_to_lock_t used to differentiate the constructor.
- * @requires If mutex_type is not a recursive mutex the calling thread does not own the mutex.
- * @effects try to lock the mutex @c mtx, stores a reference to it and to the value type @c value.
- */
- const_unique_lock_ptr(T const& val, Lockable & mtx, try_to_lock_t) BOOST_NOEXCEPT
- : base_type(mtx, try_to_lock), value_(val)
- {
- }
- /**
- * Move constructor.
- * @effects takes ownership of the mutex owned by @c other, stores a reference to the mutex and the value type of @c other.
- */
- const_unique_lock_ptr(BOOST_THREAD_RV_REF(const_unique_lock_ptr) other) BOOST_NOEXCEPT
- : base_type(boost::move(static_cast<base_type&>(other))), value_(BOOST_THREAD_RV(other).value_)
- {
- }
-
- /**
- * @effects If owns calls unlock() on the owned mutex.
- */
- ~const_unique_lock_ptr()
- {
- }
-
- /**
- * @return a constant pointer to the protected value
- */
- const T* operator->() const
- {
- BOOST_ASSERT (this->owns_lock());
- return &value_;
- }
-
- /**
- * @return a constant reference to the protected value
- */
- const T& operator*() const
- {
- BOOST_ASSERT (this->owns_lock());
- return value_;
- }
-
- };
-
- /**
- * unique lock providing a pointer access to the synchronized value type.
- *
- * @param T the value type.
- * @param Lockable the mutex type protecting the value type.
- */
- template <typename T, typename Lockable = mutex>
- class unique_lock_ptr : public const_unique_lock_ptr<T, Lockable>
- {
- typedef const_unique_lock_ptr<T, Lockable> base_type;
- public:
- typedef T value_type;
- typedef Lockable mutex_type;
-
- BOOST_THREAD_MOVABLE_ONLY(unique_lock_ptr)
-
- /**
- * @param value reference of the value to protect.
- * @param mtx reference to the mutex used to protect the value.
- * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value.
- */
- unique_lock_ptr(T & val, Lockable & mtx)
- : base_type(val, mtx)
- {
- }
- /**
- * @param value reference of the value to protect.
- * @param mtx reference to the mutex used to protect the value.
- * @param tag of type adopt_lock_t used to differentiate the constructor.
- * @effects stores a reference to it and to the value type @c value taking ownership.
- */
- unique_lock_ptr(T & value, Lockable & mtx, adopt_lock_t) BOOST_NOEXCEPT
- : base_type(value, mtx, adopt_lock)
- {
- }
- /**
- * @param value reference of the value to protect.
- * @param mtx reference to the mutex used to protect the value.
- * @param tag of type defer_lock_t used to differentiate the constructor.
- * @effects stores a reference to it and to the value type @c value c.
- */
- unique_lock_ptr(T & value, Lockable & mtx, defer_lock_t) BOOST_NOEXCEPT
- : base_type(value, mtx, defer_lock)
- {
- }
- /**
- * @param value reference of the value to protect.
- * @param mtx reference to the mutex used to protect the value.
- * @param tag of type try_to_lock_t used to differentiate the constructor.
- * @effects try to lock the mutex @c mtx, stores a reference to it and to the value type @c value.
- */
- unique_lock_ptr(T & value, Lockable & mtx, try_to_lock_t) BOOST_NOEXCEPT
- : base_type(value, mtx, try_to_lock)
- {
- }
- /**
- * Move constructor.
- * @effects takes ownership of the mutex owned by @c other, stores a reference to the mutex and the value type of @c other.
- */
- unique_lock_ptr(BOOST_THREAD_RV_REF(unique_lock_ptr) other) BOOST_NOEXCEPT
- : base_type(boost::move(static_cast<base_type&>(other)))
- {
- }
-
- ~unique_lock_ptr()
- {
- }
-
- /**
- * @return a pointer to the protected value
- */
- T* operator->()
- {
- BOOST_ASSERT (this->owns_lock());
- return const_cast<T*>(&this->value_);
- }
-
- /**
- * @return a reference to the protected value
- */
- T& operator*()
- {
- BOOST_ASSERT (this->owns_lock());
- return const_cast<T&>(this->value_);
- }
-
-
- };
-
- template <typename SV>
- struct synchronized_value_unique_lock_ptr
- {
- typedef unique_lock_ptr<typename SV::value_type, typename SV::mutex_type> type;
- };
-
- template <typename SV>
- struct synchronized_value_unique_lock_ptr<const SV>
- {
- typedef const_unique_lock_ptr<typename SV::value_type, typename SV::mutex_type> type;
- };
- /**
- * cloaks a value type and the mutex used to protect it together.
- * @param T the value type.
- * @param Lockable the mutex type protecting the value type.
- */
- template <typename T, typename Lockable = mutex>
- class synchronized_value
- {
-
-#if ! defined(BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS)
-#if ! defined BOOST_NO_CXX11_VARIADIC_TEMPLATES
- template <typename ...SV>
- friend std::tuple<typename synchronized_value_strict_lock_ptr<SV>::type ...> synchronize(SV& ...sv);
-#else
- template <typename SV1, typename SV2>
- friend std::tuple<
- typename synchronized_value_strict_lock_ptr<SV1>::type,
- typename synchronized_value_strict_lock_ptr<SV2>::type
- >
- synchronize(SV1& sv1, SV2& sv2);
- template <typename SV1, typename SV2, typename SV3>
- friend std::tuple<
- typename synchronized_value_strict_lock_ptr<SV1>::type,
- typename synchronized_value_strict_lock_ptr<SV2>::type,
- typename synchronized_value_strict_lock_ptr<SV3>::type
- >
- synchronize(SV1& sv1, SV2& sv2, SV3& sv3);
-#endif
-#endif
-
- public:
- typedef T value_type;
- typedef Lockable mutex_type;
- private:
- T value_;
- mutable mutex_type mtx_;
- public:
- // construction/destruction
- /**
- * Default constructor.
- *
- * @Requires: T is DefaultConstructible
- */
- synchronized_value()
- //BOOST_NOEXCEPT_IF(is_nothrow_default_constructible<T>::value)
- : value_()
- {
- }
-
- /**
- * Constructor from copy constructible value.
- *
- * Requires: T is CopyConstructible
- */
- synchronized_value(T const& other)
- //BOOST_NOEXCEPT_IF(is_nothrow_copy_constructible<T>::value)
- : value_(other)
- {
- }
-
- /**
- * Move Constructor.
- *
- * Requires: T is CopyMovable
- */
- synchronized_value(BOOST_THREAD_RV_REF(T) other)
- //BOOST_NOEXCEPT_IF(is_nothrow_move_constructible<T>::value)
- : value_(boost::move(other))
- {
- }
-
- /**
- * Constructor from value type.
- *
- * Requires: T is DefaultConstructible and Assignable
- * Effects: Assigns the value on a scope protected by the mutex of the rhs. The mutex is not copied.
- */
- synchronized_value(synchronized_value const& rhs)
- {
- strict_lock<mutex_type> lk(rhs.mtx_);
- value_ = rhs.value_;
- }
-
- /**
- * Move Constructor from movable value type
- *
- */
- synchronized_value(BOOST_THREAD_RV_REF(synchronized_value) other)
- {
- strict_lock<mutex_type> lk(BOOST_THREAD_RV(other).mtx_);
- value_= boost::move(BOOST_THREAD_RV(other).value_);
- }
-
- // mutation
- /**
- * Assignment operator.
- *
- * Effects: Copies the underlying value on a scope protected by the two mutexes.
- * The mutex is not copied. The locks are acquired using lock, so deadlock is avoided.
- * For example, there is no problem if one thread assigns a = b and the other assigns b = a.
- *
- * Return: *this
- */
-
- synchronized_value& operator=(synchronized_value const& rhs)
- {
- if(&rhs != this)
- {
- // auto _ = make_unique_locks(mtx_, rhs.mtx_);
- unique_lock<mutex_type> lk1(mtx_, defer_lock);
- unique_lock<mutex_type> lk2(rhs.mtx_, defer_lock);
- lock(lk1,lk2);
-
- value_ = rhs.value_;
- }
- return *this;
- }
- /**
- * Assignment operator from a T const&.
- * Effects: The operator copies the value on a scope protected by the mutex.
- * Return: *this
- */
- synchronized_value& operator=(value_type const& val)
- {
- {
- strict_lock<mutex_type> lk(mtx_);
- value_ = val;
- }
- return *this;
- }
-
- //observers
- /**
- * Explicit conversion to value type.
- *
- * Requires: T is CopyConstructible
- * Return: A copy of the protected value obtained on a scope protected by the mutex.
- *
- */
- T get() const
- {
- strict_lock<mutex_type> lk(mtx_);
- return value_;
- }
- /**
- * Explicit conversion to value type.
- *
- * Requires: T is CopyConstructible
- * Return: A copy of the protected value obtained on a scope protected by the mutex.
- *
- */
-#if ! defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
- explicit operator T() const
- {
- return get();
- }
-#endif
-
- /**
- * value type getter.
- *
- * Return: A constant reference to the protected value.
- *
- * Note: Not thread safe
- *
- */
- T const& value() const
- {
- return value_;
- }
- /**
- * mutex getter.
- *
- * Return: A constant reference to the protecting mutex.
- *
- * Note: Not thread safe
- *
- */
- mutex_type const& mutex() const
- {
- return mtx_;
- }
- /**
- * Swap
- *
- * Effects: Swaps the data. Again, locks are acquired using lock(). The mutexes are not swapped.
- * A swap method accepts a T& and swaps the data inside a critical section.
- * This is by far the preferred method of changing the guarded datum wholesale because it keeps the lock only
- * for a short time, thus lowering the pressure on the mutex.
- */
- void swap(synchronized_value & rhs)
- {
- if (this == &rhs) {
- return;
- }
- // auto _ = make_unique_locks(mtx_, rhs.mtx_);
- unique_lock<mutex_type> lk1(mtx_, defer_lock);
- unique_lock<mutex_type> lk2(rhs.mtx_, defer_lock);
- lock(lk1,lk2);
- boost::swap(value_, rhs.value_);
- }
- /**
- * Swap with the underlying value type
- *
- * Effects: Swaps the data on a scope protected by the mutex.
- */
- void swap(value_type & rhs)
- {
- strict_lock<mutex_type> lk(mtx_);
- boost::swap(value_, rhs);
- }
-
- /**
- * Essentially calling a method obj->foo(x, y, z) calls the method foo(x, y, z) inside a critical section as
- * long-lived as the call itself.
- */
- strict_lock_ptr<T,Lockable> operator->()
- {
- return BOOST_THREAD_MAKE_RV_REF((strict_lock_ptr<T,Lockable>(value_, mtx_)));
- }
- /**
- * If the synchronized_value object involved is const-qualified, then you'll only be able to call const methods
- * through operator->. So, for example, vec->push_back("xyz") won't work if vec were const-qualified.
- * The locking mechanism capitalizes on the assumption that const methods don't modify their underlying data.
- */
- const_strict_lock_ptr<T,Lockable> operator->() const
- {
- return BOOST_THREAD_MAKE_RV_REF((const_strict_lock_ptr<T,Lockable>(value_, mtx_)));
- }
-
- /**
- * Call function on a locked block.
- *
- * @requires fct(value_) is well formed.
- *
- * Example
- * void fun(synchronized_value<vector<int>> & v) {
- * v ( [](vector<int>> & vec)
- * {
- * vec.push_back(42);
- * assert(vec.back() == 42);
- * } );
- * }
- */
- template <typename F>
- inline
- typename boost::result_of<F(value_type&)>::type
- operator()(BOOST_THREAD_RV_REF(F) fct)
- {
- strict_lock<mutex_type> lk(mtx_);
- return fct(value_);
- }
- template <typename F>
- inline
- typename boost::result_of<F(value_type const&)>::type
- operator()(BOOST_THREAD_RV_REF(F) fct) const
- {
- strict_lock<mutex_type> lk(mtx_);
- return fct(value_);
- }
-
-
-#if defined BOOST_NO_CXX11_RVALUE_REFERENCES
- template <typename F>
- inline
- typename boost::result_of<F(value_type&)>::type
- operator()(F const & fct)
- {
- strict_lock<mutex_type> lk(mtx_);
- return fct(value_);
- }
- template <typename F>
- inline
- typename boost::result_of<F(value_type const&)>::type
- operator()(F const & fct) const
- {
- strict_lock<mutex_type> lk(mtx_);
- return fct(value_);
- }
-
- template <typename R>
- inline
- R operator()(R(*fct)(value_type&))
- {
- strict_lock<mutex_type> lk(mtx_);
- return fct(value_);
- }
- template <typename R>
- inline
- R operator()(R(*fct)(value_type const&)) const
- {
- strict_lock<mutex_type> lk(mtx_);
- return fct(value_);
- }
-#endif
-
-
- /**
- * The synchronize() factory make easier to lock on a scope.
- * As discussed, operator-> can only lock over the duration of a call, so it is insufficient for complex operations.
- * With synchronize() you get to lock the object in a scoped and to directly access the object inside that scope.
- *
- * Example
- * void fun(synchronized_value<vector<int>> & v) {
- * auto&& vec=v.synchronize();
- * vec.push_back(42);
- * assert(vec.back() == 42);
- * }
- */
- strict_lock_ptr<T,Lockable> synchronize()
- {
- return BOOST_THREAD_MAKE_RV_REF((strict_lock_ptr<T,Lockable>(value_, mtx_)));
- }
- const_strict_lock_ptr<T,Lockable> synchronize() const
- {
- return BOOST_THREAD_MAKE_RV_REF((const_strict_lock_ptr<T,Lockable>(value_, mtx_)));
- }
-
- unique_lock_ptr<T,Lockable> unique_synchronize()
- {
- return BOOST_THREAD_MAKE_RV_REF((unique_lock_ptr<T,Lockable>(value_, mtx_)));
- }
- const_unique_lock_ptr<T,Lockable> unique_synchronize() const
- {
- return BOOST_THREAD_MAKE_RV_REF((const_unique_lock_ptr<T,Lockable>(value_, mtx_)));
- }
- unique_lock_ptr<T,Lockable> unique_synchronize(defer_lock_t tag)
- {
- return BOOST_THREAD_MAKE_RV_REF((unique_lock_ptr<T,Lockable>(value_, mtx_, tag)));
- }
- const_unique_lock_ptr<T,Lockable> unique_synchronize(defer_lock_t tag) const
- {
- return BOOST_THREAD_MAKE_RV_REF((const_unique_lock_ptr<T,Lockable>(value_, mtx_, tag)));
- }
- unique_lock_ptr<T,Lockable> defer_synchronize() BOOST_NOEXCEPT
- {
- return BOOST_THREAD_MAKE_RV_REF((unique_lock_ptr<T,Lockable>(value_, mtx_, defer_lock)));
- }
- const_unique_lock_ptr<T,Lockable> defer_synchronize() const BOOST_NOEXCEPT
- {
- return BOOST_THREAD_MAKE_RV_REF((const_unique_lock_ptr<T,Lockable>(value_, mtx_, defer_lock)));
- }
- unique_lock_ptr<T,Lockable> try_to_synchronize() BOOST_NOEXCEPT
- {
- return BOOST_THREAD_MAKE_RV_REF((unique_lock_ptr<T,Lockable>(value_, mtx_, try_to_lock)));
- }
- const_unique_lock_ptr<T,Lockable> try_to_synchronize() const BOOST_NOEXCEPT
- {
- return BOOST_THREAD_MAKE_RV_REF((const_unique_lock_ptr<T,Lockable>(value_, mtx_, try_to_lock)));
- }
- unique_lock_ptr<T,Lockable> adopt_synchronize() BOOST_NOEXCEPT
- {
- return BOOST_THREAD_MAKE_RV_REF((unique_lock_ptr<T,Lockable>(value_, mtx_, adopt_lock)));
- }
- const_unique_lock_ptr<T,Lockable> adopt_synchronize() const BOOST_NOEXCEPT
- {
- return BOOST_THREAD_MAKE_RV_REF((const_unique_lock_ptr<T,Lockable>(value_, mtx_, adopt_lock)));
- }
-
-
-#if ! defined __IBMCPP__
- private:
-#endif
- class deref_value
- {
- private:
- friend class synchronized_value;
-
- boost::unique_lock<mutex_type> lk_;
- T& value_;
-
- explicit deref_value(synchronized_value& outer):
- lk_(outer.mtx_),value_(outer.value_)
- {}
-
- public:
- BOOST_THREAD_MOVABLE_ONLY(deref_value)
-
- deref_value(BOOST_THREAD_RV_REF(deref_value) other):
- lk_(boost::move(BOOST_THREAD_RV(other).lk_)),value_(BOOST_THREAD_RV(other).value_)
- {}
- operator T&()
- {
- return value_;
- }
-
- deref_value& operator=(T const& newVal)
- {
- value_=newVal;
- return *this;
- }
- };
- class const_deref_value
- {
- private:
- friend class synchronized_value;
-
- boost::unique_lock<mutex_type> lk_;
- const T& value_;
-
- explicit const_deref_value(synchronized_value const& outer):
- lk_(outer.mtx_), value_(outer.value_)
- {}
-
- public:
- BOOST_THREAD_MOVABLE_ONLY(const_deref_value)
-
- const_deref_value(BOOST_THREAD_RV_REF(const_deref_value) other):
- lk_(boost::move(BOOST_THREAD_RV(other).lk_)), value_(BOOST_THREAD_RV(other).value_)
- {}
-
- operator const T&()
- {
- return value_;
- }
- };
-
- public:
- deref_value operator*()
- {
- return BOOST_THREAD_MAKE_RV_REF(deref_value(*this));
- }
-
- const_deref_value operator*() const
- {
- return BOOST_THREAD_MAKE_RV_REF(const_deref_value(*this));
- }
-
- // io functions
- /**
- * @requires T is OutputStreamable
- * @effects saves the value type on the output stream @c os.
- */
- template <typename OStream>
- void save(OStream& os) const
- {
- strict_lock<mutex_type> lk(mtx_);
- os << value_;
- }
- /**
- * @requires T is InputStreamable
- * @effects loads the value type from the input stream @c is.
- */
- template <typename IStream>
- void load(IStream& is)
- {
- strict_lock<mutex_type> lk(mtx_);
- is >> value_;
- }
-
- // relational operators
- /**
- * @requires T is EqualityComparable
- *
- */
- bool operator==(synchronized_value const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_, defer_lock);
- unique_lock<mutex_type> lk2(rhs.mtx_, defer_lock);
- lock(lk1,lk2);
-
- return value_ == rhs.value_;
- }
- /**
- * @requires T is LessThanComparable
- *
- */
- bool operator<(synchronized_value const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_, defer_lock);
- unique_lock<mutex_type> lk2(rhs.mtx_, defer_lock);
- lock(lk1,lk2);
-
- return value_ < rhs.value_;
- }
- /**
- * @requires T is GreaterThanComparable
- *
- */
- bool operator>(synchronized_value const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_, defer_lock);
- unique_lock<mutex_type> lk2(rhs.mtx_, defer_lock);
- lock(lk1,lk2);
-
- return value_ > rhs.value_;
- }
- bool operator<=(synchronized_value const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_, defer_lock);
- unique_lock<mutex_type> lk2(rhs.mtx_, defer_lock);
- lock(lk1,lk2);
-
- return value_ <= rhs.value_;
- }
- bool operator>=(synchronized_value const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_, defer_lock);
- unique_lock<mutex_type> lk2(rhs.mtx_, defer_lock);
- lock(lk1,lk2);
-
- return value_ >= rhs.value_;
- }
- bool operator==(value_type const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_);
-
- return value_ == rhs;
- }
- bool operator!=(value_type const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_);
-
- return value_ != rhs;
- }
- bool operator<(value_type const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_);
-
- return value_ < rhs;
- }
- bool operator<=(value_type const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_);
-
- return value_ <= rhs;
- }
- bool operator>(value_type const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_);
-
- return value_ > rhs;
- }
- bool operator>=(value_type const& rhs) const
- {
- unique_lock<mutex_type> lk1(mtx_);
-
- return value_ >= rhs;
- }
-
- };
-
- // Specialized algorithms
- /**
- *
- */
- template <typename T, typename L>
- inline void swap(synchronized_value<T,L> & lhs, synchronized_value<T,L> & rhs)
- {
- lhs.swap(rhs);
- }
- template <typename T, typename L>
- inline void swap(synchronized_value<T,L> & lhs, T & rhs)
- {
- lhs.swap(rhs);
- }
- template <typename T, typename L>
- inline void swap(T & lhs, synchronized_value<T,L> & rhs)
- {
- rhs.swap(lhs);
- }
-
- //Hash support
-
-// template <class T> struct hash;
-// template <typename T, typename L>
-// struct hash<synchronized_value<T,L> >;
-
- // Comparison with T
- template <typename T, typename L>
- bool operator!=(synchronized_value<T,L> const&lhs, synchronized_value<T,L> const& rhs)
- {
- return ! (lhs==rhs);
- }
-
- template <typename T, typename L>
- bool operator==(T const& lhs, synchronized_value<T,L> const&rhs)
- {
- return rhs==lhs;
- }
- template <typename T, typename L>
- bool operator!=(T const& lhs, synchronized_value<T,L> const&rhs)
- {
- return rhs!=lhs;
- }
- template <typename T, typename L>
- bool operator<(T const& lhs, synchronized_value<T,L> const&rhs)
- {
- return rhs>lhs;
- }
- template <typename T, typename L>
- bool operator<=(T const& lhs, synchronized_value<T,L> const&rhs)
- {
- return rhs>=lhs;
- }
- template <typename T, typename L>
- bool operator>(T const& lhs, synchronized_value<T,L> const&rhs)
- {
- return rhs<lhs;
- }
- template <typename T, typename L>
- bool operator>=(T const& lhs, synchronized_value<T,L> const&rhs)
- {
- return rhs<=lhs;
- }
-
- /**
- *
- */
- template <typename OStream, typename T, typename L>
- inline OStream& operator<<(OStream& os, synchronized_value<T,L> const& rhs)
- {
- rhs.save(os);
- return os;
- }
- template <typename IStream, typename T, typename L>
- inline IStream& operator>>(IStream& is, synchronized_value<T,L>& rhs)
- {
- rhs.load(is);
- return is;
- }
-
-#if ! defined(BOOST_THREAD_NO_SYNCHRONIZE)
-#if ! defined BOOST_NO_CXX11_VARIADIC_TEMPLATES
-
- template <typename ...SV>
- std::tuple<typename synchronized_value_strict_lock_ptr<SV>::type ...> synchronize(SV& ...sv)
- {
- boost::lock(sv.mtx_ ...);
- typedef std::tuple<typename synchronized_value_strict_lock_ptr<SV>::type ...> t_type;
-
- return t_type(typename synchronized_value_strict_lock_ptr<SV>::type(sv.value_, sv.mtx_, adopt_lock) ...);
- }
-#else
-
- template <typename SV1, typename SV2>
- std::tuple<
- typename synchronized_value_strict_lock_ptr<SV1>::type,
- typename synchronized_value_strict_lock_ptr<SV2>::type
- >
- synchronize(SV1& sv1, SV2& sv2)
- {
- boost::lock(sv1.mtx_, sv2.mtx_);
- typedef std::tuple<
- typename synchronized_value_strict_lock_ptr<SV1>::type,
- typename synchronized_value_strict_lock_ptr<SV2>::type
- > t_type;
-
- return t_type(
- typename synchronized_value_strict_lock_ptr<SV1>::type(sv1.value_, sv1.mtx_, adopt_lock),
- typename synchronized_value_strict_lock_ptr<SV2>::type(sv2.value_, sv2.mtx_, adopt_lock)
- );
-
- }
- template <typename SV1, typename SV2, typename SV3>
- std::tuple<
- typename synchronized_value_strict_lock_ptr<SV1>::type,
- typename synchronized_value_strict_lock_ptr<SV2>::type,
- typename synchronized_value_strict_lock_ptr<SV3>::type
- >
- synchronize(SV1& sv1, SV2& sv2, SV3& sv3)
- {
- boost::lock(sv1.mtx_, sv2.mtx_);
- typedef std::tuple<
- typename synchronized_value_strict_lock_ptr<SV1>::type,
- typename synchronized_value_strict_lock_ptr<SV2>::type,
- typename synchronized_value_strict_lock_ptr<SV3>::type
- > t_type;
-
- return t_type(
- typename synchronized_value_strict_lock_ptr<SV1>::type(sv1.value_, sv1.mtx_, adopt_lock),
- typename synchronized_value_strict_lock_ptr<SV2>::type(sv2.value_, sv2.mtx_, adopt_lock),
- typename synchronized_value_strict_lock_ptr<SV3>::type(sv3.value_, sv3.mtx_, adopt_lock)
- );
-
- }
-#endif
-#endif
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/testable_mutex.hpp b/contrib/restricted/boost/boost/thread/testable_mutex.hpp
deleted file mode 100644
index 3c87f9349a..0000000000
--- a/contrib/restricted/boost/boost/thread/testable_mutex.hpp
+++ /dev/null
@@ -1,152 +0,0 @@
-// (C) Copyright 2012 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)
-
-
-#ifndef BOOST_THREAD_TESTABLE_LOCKABLE_HPP
-#define BOOST_THREAD_TESTABLE_LOCKABLE_HPP
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/thread/thread_only.hpp>
-
-#include <boost/atomic.hpp>
-#include <boost/assert.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
- /**
- * Based on Associate Mutexes with Data to Prevent Races, By Herb Sutter, May 13, 2010
- * http://www.drdobbs.com/windows/associate-mutexes-with-data-to-prevent-r/224701827?pgno=3
- *
- * Make our mutex testable if it isn't already.
- *
- * Many mutex services (including boost::mutex) don't provide a way to ask,
- * "Do I already hold a lock on this mutex?"
- * Sometimes it is needed to know if a method like is_locked to be available.
- * This wrapper associates an arbitrary lockable type with a thread id that stores the ID of the thread that
- * currently holds the lockable. The thread id initially holds an invalid value that means no threads own the mutex.
- * When we acquire a lock, we set the thread id; and when we release a lock, we reset it back to its default no id state.
- *
- */
- template <typename Lockable>
- class testable_mutex
- {
- Lockable mtx_;
- atomic<thread::id> id_;
- public:
- /// the type of the wrapped lockable
- typedef Lockable lockable_type;
-
- /// Non copyable
- BOOST_THREAD_NO_COPYABLE(testable_mutex)
-
- testable_mutex() : id_(thread::id()) {}
-
- void lock()
- {
- BOOST_ASSERT(! is_locked_by_this_thread());
- mtx_.lock();
- id_ = this_thread::get_id();
- }
-
- void unlock()
- {
- BOOST_ASSERT(is_locked_by_this_thread());
- id_ = thread::id();
- mtx_.unlock();
- }
-
- bool try_lock()
- {
- BOOST_ASSERT(! is_locked_by_this_thread());
- if (mtx_.try_lock())
- {
- id_ = this_thread::get_id();
- return true;
- }
- else
- {
- return false;
- }
- }
-#ifdef BOOST_THREAD_USES_CHRONO
- template <class Rep, class Period>
- bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
- {
- BOOST_ASSERT(! is_locked_by_this_thread());
- if (mtx_.try_lock_for(rel_time))
- {
- id_ = this_thread::get_id();
- return true;
- }
- else
- {
- return false;
- }
- }
- template <class Clock, class Duration>
- bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time)
- {
- BOOST_ASSERT(! is_locked_by_this_thread());
- if (mtx_.try_lock_until(abs_time))
- {
- id_ = this_thread::get_id();
- return true;
- }
- else
- {
- return false;
- }
- }
-#endif
-
- bool is_locked_by_this_thread() const
- {
- return this_thread::get_id() == id_;
- }
- bool is_locked() const
- {
- return ! (thread::id() == id_);
- }
-
- thread::id get_id() const
- {
- return id_;
- }
-
- // todo add the shared and upgrade mutex functions
- };
-
- template <typename Lockable>
- struct is_testable_lockable : false_type
- {};
-
- template <typename Lockable>
- struct is_testable_lockable<testable_mutex<Lockable> > : true_type
- {};
-
-// /**
-// * Overloaded function used to check if the mutex is locked when it is testable and do nothing otherwise.
-// *
-// * This function is used usually to assert the pre-condition when the function can only be called when the mutex
-// * must be locked by the current thread.
-// */
-// template <typename Lockable>
-// bool is_locked_by_this_thread(testable_mutex<Lockable> const& mtx)
-// {
-// return mtx.is_locked();
-// }
-// template <typename Lockable>
-// bool is_locked_by_this_thread(Lockable const&)
-// {
-// return true;
-// }
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif // header
diff --git a/contrib/restricted/boost/boost/thread/thread_functors.hpp b/contrib/restricted/boost/boost/thread/thread_functors.hpp
deleted file mode 100644
index f134593ffe..0000000000
--- a/contrib/restricted/boost/boost/thread/thread_functors.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// 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)
-// (C) Copyright 2009-2012 Anthony Williams
-// (C) Copyright 2012 Vicente J. Botet Escriba
-
-// Based on the Anthony's idea of scoped_thread in CCiA
-
-#ifndef BOOST_THREAD_THREAD_FUNCTORS_HPP
-#define BOOST_THREAD_THREAD_FUNCTORS_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/thread_only.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
- struct detach
- {
- template <class Thread>
- void operator()(Thread& t)
- {
- t.detach();
- }
- };
-
- struct detach_if_joinable
- {
- template <class Thread>
- void operator()(Thread& t)
- {
- if (t.joinable())
- {
- t.detach();
- }
- }
- };
-
- struct join_if_joinable
- {
- template <class Thread>
- void operator()(Thread& t)
- {
- if (t.joinable())
- {
- t.join();
- }
- }
- };
-
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- struct interrupt_and_join_if_joinable
- {
- template <class Thread>
- void operator()(Thread& t)
- {
- if (t.joinable())
- {
- t.interrupt();
- t.join();
- }
- }
- };
-#endif
-}
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/thread_guard.hpp b/contrib/restricted/boost/boost/thread/thread_guard.hpp
deleted file mode 100644
index 64eb453c73..0000000000
--- a/contrib/restricted/boost/boost/thread/thread_guard.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// 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)
-// (C) Copyright 2009-2012 Anthony Williams
-// (C) Copyright 2012 Vicente J. Botet Escriba
-
-// Based on the Anthony's idea of thread_joiner in CCiA
-
-#ifndef BOOST_THREAD_THREAD_GUARD_HPP
-#define BOOST_THREAD_THREAD_GUARD_HPP
-
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/thread_functors.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
- /**
- * Non-copyable RAII scoped thread guard joiner which join the thread if joinable when destroyed.
- */
- template <class CallableThread = join_if_joinable, class Thread=::boost::thread>
- class thread_guard
- {
- Thread& t_;
- public:
- BOOST_THREAD_NO_COPYABLE( thread_guard)
-
- explicit thread_guard(Thread& t) :
- t_(t)
- {
- }
- ~thread_guard()
- {
- CallableThread on_destructor;
-
- on_destructor(t_);
- }
- };
-
-}
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/thread_pool.hpp b/contrib/restricted/boost/boost/thread/thread_pool.hpp
deleted file mode 100644
index 4d2dcbea3a..0000000000
--- a/contrib/restricted/boost/boost/thread/thread_pool.hpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (C) 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)
-//
-// 2013/09 Vicente J. Botet Escriba
-// Adapt to boost from CCIA C++11 implementation
-// first implementation of a simple pool thread using a vector of threads and a sync_queue.
-
-#ifndef BOOST_THREAD_THREAD_POOL_HPP
-#define BOOST_THREAD_THREAD_POOL_HPP
-
-#include <boost/thread/executors/basic_thread_pool.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/user_scheduler.hpp b/contrib/restricted/boost/boost/thread/user_scheduler.hpp
deleted file mode 100644
index 75a55c4909..0000000000
--- a/contrib/restricted/boost/boost/thread/user_scheduler.hpp
+++ /dev/null
@@ -1,202 +0,0 @@
-// Copyright (C) 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)
-//
-// 2013/11 Vicente J. Botet Escriba
-// first implementation of a simple serial scheduler.
-
-#ifndef BOOST_THREAD_USER_SCHEDULER_HPP
-#define BOOST_THREAD_USER_SCHEDULER_HPP
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/detail/delete.hpp>
-#include <boost/thread/detail/move.hpp>
-#include <boost/thread/concurrent_queues/sync_queue.hpp>
-#include <boost/thread/executors/work.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
-
- class user_scheduler
- {
- /// type-erasure to store the works to do
- typedef executors::work work;
-
- /// the thread safe work queue
- sync_queue<work > work_queue;
-
- public:
- /**
- * Effects: try to execute one task.
- * Returns: whether a task has been executed.
- * Throws: whatever the current task constructor throws or the task() throws.
- */
- bool try_executing_one()
- {
- work task;
- try
- {
- if (work_queue.try_pull(task) == queue_op_status::success)
- {
- task();
- return true;
- }
- return false;
- }
- catch (std::exception& )
- {
- return false;
- }
- catch (...)
- {
- return false;
- }
- }
- private:
- /**
- * Effects: schedule one task or yields
- * Throws: whatever the current task constructor throws or the task() throws.
- */
- void schedule_one_or_yield()
- {
- if ( ! try_executing_one())
- {
- this_thread::yield();
- }
- }
-
-
- /**
- * The main loop of the worker thread
- */
- void worker_thread()
- {
- while (!closed())
- {
- schedule_one_or_yield();
- }
- while (try_executing_one())
- {
- }
- }
-
- public:
- /// user_scheduler is not copyable.
- BOOST_THREAD_NO_COPYABLE(user_scheduler)
-
- /**
- * \b Effects: creates a thread pool that runs closures using one of its closure-executing methods.
- *
- * \b Throws: Whatever exception is thrown while initializing the needed resources.
- */
- user_scheduler()
- {
- }
- /**
- * \b Effects: Destroys the thread pool.
- *
- * \b Synchronization: The completion of all the closures happen before the completion of the \c user_scheduler destructor.
- */
- ~user_scheduler()
- {
- // signal to all the worker thread that there will be no more submissions.
- close();
- }
-
- /**
- * loop
- */
- void loop() { worker_thread(); }
- /**
- * \b Effects: close the \c user_scheduler for submissions.
- * The loop will work until there is no more closures to run.
- */
- void close()
- {
- work_queue.close();
- }
-
- /**
- * \b Returns: whether the pool is closed for submissions.
- */
- bool closed()
- {
- return work_queue.closed();
- }
-
- /**
- * \b Requires: \c Closure is a model of \c Callable(void()) and a model of \c CopyConstructible/MoveConstructible.
- *
- * \b Effects: The specified \c closure will be scheduled for execution at some point in the future.
- * If invoked closure throws an exception the \c user_scheduler will call \c std::terminate, as is the case with threads.
- *
- * \b Synchronization: completion of \c closure on a particular thread happens before destruction of thread's thread local variables.
- *
- * \b Throws: \c sync_queue_is_closed if the thread pool is closed.
- * Whatever exception that can be throw while storing the closure.
- */
-
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template <typename Closure>
- void submit(Closure & closure)
- {
- work w ((closure));
- work_queue.push(boost::move(w));
- //work_queue.push(work(closure)); // todo check why this doesn't work
- }
-#endif
- void submit(void (*closure)())
- {
- work w ((closure));
- work_queue.push(boost::move(w));
- //work_queue.push(work(closure)); // todo check why this doesn't work
- }
-
- template <typename Closure>
- void submit(BOOST_THREAD_RV_REF(Closure) closure)
- {
- work w =boost::move(closure);
- work_queue.push(boost::move(w));
- //work_queue.push(work(boost::move(closure))); // todo check why this doesn't work
- }
-
- /**
- * \b Requires: This must be called from an scheduled task.
- *
- * \b Effects: reschedule functions until pred()
- */
- template <typename Pred>
- bool reschedule_until(Pred const& pred)
- {
- do {
- if ( ! try_executing_one())
- {
- return false;
- }
- } while (! pred());
- return true;
- }
- /**
- * run queued closures
- */
- void run_queued_closures()
- {
- sync_queue<work>::underlying_queue_type q = work_queue.underlying_queue();
- while (q.empty())
- {
- work task = q.front();
- q.pop_front();
- task();
- }
- }
-
- };
-
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/win32/mfc_thread_init.hpp b/contrib/restricted/boost/boost/thread/win32/mfc_thread_init.hpp
deleted file mode 100644
index 5565a5a485..0000000000
--- a/contrib/restricted/boost/boost/thread/win32/mfc_thread_init.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef BOOST_THREAD_WIN32_MFC_THREAD_INIT_HPP
-#define BOOST_THREAD_WIN32_MFC_THREAD_INIT_HPP
-// 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)
-// (C) Copyright 2008 Anthony Williams
-// (C) Copyright 2011-2012 Vicente J. Botet Escriba
-
-
-// check if we use MFC
-#ifdef _AFXDLL
-# if defined(_AFXEXT)
-
-// can't use ExtRawDllMain from afxdllx.h as it also defines the symbol _pRawDllMain
-extern "C"
-inline BOOL WINAPI ExtRawDllMain(HINSTANCE, DWORD dwReason, LPVOID)
-{
- if (dwReason == DLL_PROCESS_ATTACH)
- {
- // save critical data pointers before running the constructors
- AFX_MODULE_STATE* pModuleState = AfxGetModuleState();
- pModuleState->m_pClassInit = pModuleState->m_classList;
- pModuleState->m_pFactoryInit = pModuleState->m_factoryList;
- pModuleState->m_classList.m_pHead = NULL;
- pModuleState->m_factoryList.m_pHead = NULL;
- }
- return TRUE; // ok
-}
-
-extern "C" __declspec(selectany) BOOL (WINAPI * const _pRawDllMainOrig)(HINSTANCE, DWORD, LPVOID) = &ExtRawDllMain;
-
-# elif defined(_USRDLL)
-
-extern "C" BOOL WINAPI RawDllMain(HINSTANCE, DWORD dwReason, LPVOID);
-extern "C" __declspec(selectany) BOOL (WINAPI * const _pRawDllMainOrig)(HINSTANCE, DWORD, LPVOID) = &RawDllMain;
-
-# endif
-#endif
-
-#endif
diff --git a/contrib/restricted/boost/boost/thread/with_lock_guard.hpp b/contrib/restricted/boost/boost/thread/with_lock_guard.hpp
deleted file mode 100644
index 5d99b36f2e..0000000000
--- a/contrib/restricted/boost/boost/thread/with_lock_guard.hpp
+++ /dev/null
@@ -1,234 +0,0 @@
-// (C) Copyright 2013 Ruslan Baratov
-// Copyright (C) 2014 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 www.boost.org/libs/thread for documentation.
-
-#ifndef BOOST_THREAD_WITH_LOCK_GUARD_HPP
-#define BOOST_THREAD_WITH_LOCK_GUARD_HPP
-
-#include <boost/thread/lock_guard.hpp>
-#include <boost/utility/result_of.hpp>
-//#include <boost/thread/detail/invoke.hpp>
-
-namespace boost {
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
- !defined(BOOST_NO_CXX11_DECLTYPE) && \
- !defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES)
-
-/**
- * Utility to run functions in scope protected by mutex.
- *
- * Examples:
- *
- * int func(int, int&);
- * boost::mutex m;
- * int a;
- * int result = boost::with_lock_guard(m, func, 1, boost::ref(a));
- *
- * // using boost::bind
- * int result = boost::with_lock_guard(
- * m, boost::bind(func, 2, boost::ref(a))
- * );
- *
- * // using lambda
- * int a;
- * int result = boost::with_lock_guard(
- * m,
- * [&a](int x) {
- * a = 3;
- * return x + 4;
- * },
- * 5
- * );
- */
-template <class Lockable, class Function, class... Args>
-typename boost::result_of<Function(Args...)>::type with_lock_guard(
- Lockable& m,
- BOOST_FWD_REF(Function) func,
- BOOST_FWD_REF(Args)... args
-) //-> decltype(func(boost::forward<Args>(args)...))
-{
- boost::lock_guard<Lockable> lock(m);
- return func(boost::forward<Args>(args)...);
-}
-
-#else
-
-// Workaround versions for compilers without c++11 variadic templates support.
-// (function arguments limit: 4)
-// (for lambda support define BOOST_RESULT_OF_USE_DECLTYPE may be needed)
-
-template <class Lockable, class Func>
-typename boost::result_of<Func()>::type with_lock_guard(
- Lockable& m,
- BOOST_FWD_REF(Func) func
-) {
- boost::lock_guard<Lockable> lock(m);
- return func();
-}
-
-template <class Lockable, class Func, class Arg>
-typename boost::result_of<Func(Arg)>::type with_lock_guard(
- Lockable& m,
- BOOST_FWD_REF(Func) func,
- BOOST_FWD_REF(Arg) arg
-) {
- boost::lock_guard<Lockable> lock(m);
- return func(
- boost::forward<Arg>(arg)
- );
-}
-
-template <class Lockable, class Func, class Arg1, class Arg2>
-typename boost::result_of<Func(Arg1, Arg2)>::type with_lock_guard(
- Lockable& m,
- BOOST_FWD_REF(Func) func,
- BOOST_FWD_REF(Arg1) arg1,
- BOOST_FWD_REF(Arg2) arg2
-) {
- boost::lock_guard<Lockable> lock(m);
- return func(
- boost::forward<Arg1>(arg1),
- boost::forward<Arg2>(arg2)
- );
-}
-
-template <class Lockable, class Func, class Arg1, class Arg2, class Arg3>
-typename boost::result_of<Func(Arg1, Arg2, Arg3)>::type with_lock_guard(
- Lockable& m,
- BOOST_FWD_REF(Func) func,
- BOOST_FWD_REF(Arg1) arg1,
- BOOST_FWD_REF(Arg2) arg2,
- BOOST_FWD_REF(Arg3) arg3
-) {
- boost::lock_guard<Lockable> lock(m);
- return func(
- boost::forward<Arg1>(arg1),
- boost::forward<Arg2>(arg2),
- boost::forward<Arg3>(arg3)
- );
-}
-
-template <
- class Lockable, class Func, class Arg1, class Arg2, class Arg3, class Arg4
->
-typename boost::result_of<Func(Arg1, Arg2, Arg3, Arg4)>::type with_lock_guard(
- Lockable& m,
- BOOST_FWD_REF(Func) func,
- BOOST_FWD_REF(Arg1) arg1,
- BOOST_FWD_REF(Arg2) arg2,
- BOOST_FWD_REF(Arg3) arg3,
- BOOST_FWD_REF(Arg4) arg4
-) {
- boost::lock_guard<Lockable> lock(m);
- return func(
- boost::forward<Arg1>(arg1),
- boost::forward<Arg2>(arg2),
- boost::forward<Arg3>(arg3),
- boost::forward<Arg4>(arg4)
- );
-}
-
-// overloads for function pointer
-// (if argument is not function pointer, static assert will trigger)
-template <class Lockable, class Func>
-typename boost::result_of<
- typename boost::add_pointer<Func>::type()
->::type with_lock_guard(
- Lockable& m,
- Func* func
-) {
- BOOST_STATIC_ASSERT(boost::is_function<Func>::value);
-
- boost::lock_guard<Lockable> lock(m);
- return func();
-}
-
-template <class Lockable, class Func, class Arg>
-typename boost::result_of<
- typename boost::add_pointer<Func>::type(Arg)
->::type with_lock_guard(
- Lockable& m,
- Func* func,
- BOOST_FWD_REF(Arg) arg
-) {
- BOOST_STATIC_ASSERT(boost::is_function<Func>::value);
-
- boost::lock_guard<Lockable> lock(m);
- return func(
- boost::forward<Arg>(arg)
- );
-}
-
-template <class Lockable, class Func, class Arg1, class Arg2>
-typename boost::result_of<
- typename boost::add_pointer<Func>::type(Arg1, Arg2)
->::type with_lock_guard(
- Lockable& m,
- Func* func,
- BOOST_FWD_REF(Arg1) arg1,
- BOOST_FWD_REF(Arg2) arg2
-) {
- BOOST_STATIC_ASSERT(boost::is_function<Func>::value);
-
- boost::lock_guard<Lockable> lock(m);
- return func(
- boost::forward<Arg1>(arg1),
- boost::forward<Arg2>(arg2)
- );
-}
-
-template <class Lockable, class Func, class Arg1, class Arg2, class Arg3>
-typename boost::result_of<
- typename boost::add_pointer<Func>::type(Arg1, Arg2, Arg3)
->::type with_lock_guard(
- Lockable& m,
- Func* func,
- BOOST_FWD_REF(Arg1) arg1,
- BOOST_FWD_REF(Arg2) arg2,
- BOOST_FWD_REF(Arg3) arg3
-) {
- BOOST_STATIC_ASSERT(boost::is_function<Func>::value);
-
- boost::lock_guard<Lockable> lock(m);
- return func(
- boost::forward<Arg1>(arg1),
- boost::forward<Arg2>(arg2),
- boost::forward<Arg3>(arg3)
- );
-}
-
-template <
- class Lockable, class Func, class Arg1, class Arg2, class Arg3, class Arg4
->
-typename boost::result_of<
- typename boost::add_pointer<Func>::type(Arg1, Arg2, Arg3, Arg4)
->::type with_lock_guard(
- Lockable& m,
- Func* func,
- BOOST_FWD_REF(Arg1) arg1,
- BOOST_FWD_REF(Arg2) arg2,
- BOOST_FWD_REF(Arg3) arg3,
- BOOST_FWD_REF(Arg4) arg4
-) {
- BOOST_STATIC_ASSERT(boost::is_function<Func>::value);
-
- boost::lock_guard<Lockable> lock(m);
- return func(
- boost::forward<Arg1>(arg1),
- boost::forward<Arg2>(arg2),
- boost::forward<Arg3>(arg3),
- boost::forward<Arg4>(arg4)
- );
-}
-
-#endif
-
-} // namespace boost
-
-#endif // BOOST_THREAD_WITH_LOCK_GUARD_HPP
-
diff --git a/contrib/restricted/boost/libs/graph/CMakeLists.txt b/contrib/restricted/boost/libs/graph/CMakeLists.txt
index 7c75519d35..95b301dd94 100644
--- a/contrib/restricted/boost/libs/graph/CMakeLists.txt
+++ b/contrib/restricted/boost/libs/graph/CMakeLists.txt
@@ -14,5 +14,5 @@ target_link_libraries(boost-libs-graph INTERFACE
restricted-boost-atomic
restricted-boost-exception
restricted-boost-filesystem
- boost-libs-thread
+ restricted-boost-thread
)
diff --git a/contrib/restricted/boost/libs/thread/CMakeLists.darwin.txt b/contrib/restricted/boost/libs/thread/CMakeLists.darwin.txt
deleted file mode 100644
index 71463e5380..0000000000
--- a/contrib/restricted/boost/libs/thread/CMakeLists.darwin.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-
-# This file was gererated by the build system used internally in the Yandex monorepo.
-# Only simple modifications are allowed (adding source-files to targets, adding simple properties
-# like target_include_directories). These modifications will be ported to original
-# ya.make files by maintainers. Any complex modifications which can't be ported back to the
-# original buildsystem will not be accepted.
-
-
-
-add_library(boost-libs-thread)
-target_compile_options(boost-libs-thread PRIVATE
- -DBOOST_ATOMIC_STATIC_LINK=1
- -DBOOST_All_STATIC_LINK=1
- -DBOOST_CHRONO_STATIC_LINK=1
- -DBOOST_SYSTEM_STATIC_LINK=1
- -DBOOST_TIMER_STATIC_LINK=1
- -DBOOST_ALL_NO_LIB=1
- -DBOOST_ATOMIC_SOURCE
- -DBOOST_COROUTINES_SOURCE
- -DBOOST_DISABLE_ASSERTS
- -DBOOST_SPIRIT_USE_PHOENIX_V3=1
- -DBOOST_SYSTEM_NO_DEPRECATED
- -DBOOST_THREAD_BUILD_LIB=1
- -DBOOST_THREAD_DONT_USE_CHRONO=1
- -DBOOST_THREAD_NO_LIB=1
- -DBOOST_THREAD_USE_LIB=1
- -DDATE_TIME_INLINE
- -DBOOST_THREAD_DONT_USE_CHRONO
- -DBOOST_THREAD_POSIX
- -D_DARWIN_C_SOURCE=1
- -Wno-everything
-)
-target_link_libraries(boost-libs-thread PUBLIC
- contrib-libs-cxxsupp
- contrib-restricted-boost
- restricted-boost-atomic
- restricted-boost-container
- restricted-boost-date_time
- restricted-boost-exception
- restricted-boost-chrono
- restricted-boost-system
-)
-target_sources(boost-libs-thread PRIVATE
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/thread/src/pthread/once.cpp
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/thread/src/pthread/thread.cpp
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/thread/src/future.cpp
-)
diff --git a/contrib/restricted/boost/libs/thread/CMakeLists.linux.txt b/contrib/restricted/boost/libs/thread/CMakeLists.linux.txt
deleted file mode 100644
index c097ffbbcd..0000000000
--- a/contrib/restricted/boost/libs/thread/CMakeLists.linux.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-
-# This file was gererated by the build system used internally in the Yandex monorepo.
-# Only simple modifications are allowed (adding source-files to targets, adding simple properties
-# like target_include_directories). These modifications will be ported to original
-# ya.make files by maintainers. Any complex modifications which can't be ported back to the
-# original buildsystem will not be accepted.
-
-
-
-add_library(boost-libs-thread)
-target_compile_options(boost-libs-thread PRIVATE
- -DBOOST_ATOMIC_STATIC_LINK=1
- -DBOOST_All_STATIC_LINK=1
- -DBOOST_CHRONO_STATIC_LINK=1
- -DBOOST_SYSTEM_STATIC_LINK=1
- -DBOOST_TIMER_STATIC_LINK=1
- -DBOOST_ALL_NO_LIB=1
- -DBOOST_ATOMIC_SOURCE
- -DBOOST_COROUTINES_SOURCE
- -DBOOST_DISABLE_ASSERTS
- -DBOOST_SPIRIT_USE_PHOENIX_V3=1
- -DBOOST_SYSTEM_NO_DEPRECATED
- -DBOOST_THREAD_BUILD_LIB=1
- -DBOOST_THREAD_DONT_USE_CHRONO=1
- -DBOOST_THREAD_NO_LIB=1
- -DBOOST_THREAD_USE_LIB=1
- -DDATE_TIME_INLINE
- -DBOOST_THREAD_DONT_USE_CHRONO
- -DBOOST_THREAD_POSIX
- -Wno-everything
-)
-target_link_libraries(boost-libs-thread PUBLIC
- contrib-libs-cxxsupp
- contrib-restricted-boost
- restricted-boost-atomic
- restricted-boost-container
- restricted-boost-date_time
- restricted-boost-exception
- restricted-boost-chrono
- restricted-boost-system
-)
-target_sources(boost-libs-thread PRIVATE
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/thread/src/pthread/once.cpp
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/thread/src/pthread/thread.cpp
- ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/libs/thread/src/future.cpp
-)
diff --git a/contrib/restricted/boost/libs/thread/CMakeLists.txt b/contrib/restricted/boost/libs/thread/CMakeLists.txt
deleted file mode 100644
index fc7b1ee73c..0000000000
--- a/contrib/restricted/boost/libs/thread/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-
-# This file was gererated by the build system used internally in the Yandex monorepo.
-# Only simple modifications are allowed (adding source-files to targets, adding simple properties
-# like target_include_directories). These modifications will be ported to original
-# ya.make files by maintainers. Any complex modifications which can't be ported back to the
-# original buildsystem will not be accepted.
-
-
-if (APPLE)
- include(CMakeLists.darwin.txt)
-elseif (UNIX AND NOT APPLE)
- include(CMakeLists.linux.txt)
-endif()
diff --git a/contrib/restricted/boost/system/include/boost/system/detail/std_category.hpp b/contrib/restricted/boost/system/include/boost/system/detail/std_category.hpp
index 2b98aa7b20..63051e49a5 100644
--- a/contrib/restricted/boost/system/include/boost/system/detail/std_category.hpp
+++ b/contrib/restricted/boost/system/include/boost/system/detail/std_category.hpp
@@ -43,7 +43,7 @@ public:
{
if( id != 0 )
{
-#if defined(_MSC_VER) && defined(_CPPLIB_VER) && _MSC_VER >= 1900 && _MSC_VER < 2000
+#if defined(_MSC_VER) && defined(_CPPLIB_VER) && _MSC_VER >= 1900 && _MSC_VER < 2000 && !defined(_LIBCPP_VERSION)
// Poking into the protected _Addr member of std::error_category
// is not a particularly good programming practice, but what can
diff --git a/contrib/restricted/boost/thread/CMakeLists.txt b/contrib/restricted/boost/thread/CMakeLists.txt
new file mode 100644
index 0000000000..0706ca8cc3
--- /dev/null
+++ b/contrib/restricted/boost/thread/CMakeLists.txt
@@ -0,0 +1,58 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(restricted-boost-thread)
+target_compile_options(restricted-boost-thread PUBLIC
+ -DBOOST_THREAD_USE_LIB
+ -DBOOST_THREAD_POSIX
+)
+target_compile_options(restricted-boost-thread PRIVATE
+ -DBOOST_THREAD_BUILD_LIB
+ -DBOOST_THREAD_DONT_USE_CHRONO
+ -Wno-everything
+)
+target_include_directories(restricted-boost-thread PUBLIC
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/thread/include
+)
+target_link_libraries(restricted-boost-thread PUBLIC
+ contrib-libs-cxxsupp
+ restricted-boost-assert
+ restricted-boost-atomic
+ restricted-boost-bind
+ restricted-boost-chrono
+ restricted-boost-concept_check
+ restricted-boost-config
+ restricted-boost-container
+ restricted-boost-container_hash
+ restricted-boost-core
+ restricted-boost-date_time
+ restricted-boost-exception
+ restricted-boost-function
+ restricted-boost-intrusive
+ restricted-boost-io
+ restricted-boost-iterator
+ restricted-boost-move
+ restricted-boost-mpl
+ restricted-boost-optional
+ restricted-boost-predef
+ restricted-boost-preprocessor
+ restricted-boost-smart_ptr
+ restricted-boost-static_assert
+ restricted-boost-system
+ restricted-boost-throw_exception
+ restricted-boost-tuple
+ restricted-boost-type_traits
+ restricted-boost-utility
+ restricted-boost-winapi
+)
+target_sources(restricted-boost-thread PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/thread/src/future.cpp
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/thread/src/pthread/once.cpp
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/thread/src/pthread/thread.cpp
+)
diff --git a/contrib/restricted/boost/thread/README.md b/contrib/restricted/boost/thread/README.md
new file mode 100644
index 0000000000..190775925f
--- /dev/null
+++ b/contrib/restricted/boost/thread/README.md
@@ -0,0 +1,10 @@
+thread
+======
+
+Portable C++ multi-threading. C++11, C++14.
+
+### License
+
+Distributed under the [Boost Software License, Version 1.0](http://boost.org/LICENSE_1_0.txt).
+
+
diff --git a/contrib/restricted/boost/boost/thread.hpp b/contrib/restricted/boost/thread/include/boost/thread.hpp
index 892bbb853b..892bbb853b 100644
--- a/contrib/restricted/boost/boost/thread.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread.hpp
diff --git a/contrib/restricted/boost/boost/thread/barrier.hpp b/contrib/restricted/boost/thread/include/boost/thread/barrier.hpp
index 4c1b1b59a0..4c1b1b59a0 100644
--- a/contrib/restricted/boost/boost/thread/barrier.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/barrier.hpp
diff --git a/contrib/restricted/boost/boost/thread/condition_variable.hpp b/contrib/restricted/boost/thread/include/boost/thread/condition_variable.hpp
index 8f8e9f2ed6..8f8e9f2ed6 100644
--- a/contrib/restricted/boost/boost/thread/condition_variable.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/condition_variable.hpp
diff --git a/contrib/restricted/boost/boost/thread/csbl/functional.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/functional.hpp
index 7a7e928b70..7a7e928b70 100644
--- a/contrib/restricted/boost/boost/thread/csbl/functional.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/functional.hpp
diff --git a/contrib/restricted/boost/boost/thread/csbl/memory/allocator_arg.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_arg.hpp
index 354cdaee88..354cdaee88 100644
--- a/contrib/restricted/boost/boost/thread/csbl/memory/allocator_arg.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_arg.hpp
diff --git a/contrib/restricted/boost/boost/thread/csbl/memory/allocator_traits.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_traits.hpp
index 3737cd85de..3737cd85de 100644
--- a/contrib/restricted/boost/boost/thread/csbl/memory/allocator_traits.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_traits.hpp
diff --git a/contrib/restricted/boost/boost/thread/csbl/memory/config.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/config.hpp
index 7b0596ac49..7b0596ac49 100644
--- a/contrib/restricted/boost/boost/thread/csbl/memory/config.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/config.hpp
diff --git a/contrib/restricted/boost/boost/thread/csbl/memory/pointer_traits.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/pointer_traits.hpp
index 320f8e9e77..320f8e9e77 100644
--- a/contrib/restricted/boost/boost/thread/csbl/memory/pointer_traits.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/pointer_traits.hpp
diff --git a/contrib/restricted/boost/boost/thread/csbl/memory/scoped_allocator.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/scoped_allocator.hpp
index a92f3d8514..a92f3d8514 100644
--- a/contrib/restricted/boost/boost/thread/csbl/memory/scoped_allocator.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/scoped_allocator.hpp
diff --git a/contrib/restricted/boost/boost/thread/csbl/memory/shared_ptr.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/shared_ptr.hpp
index e9a9383723..e9a9383723 100644
--- a/contrib/restricted/boost/boost/thread/csbl/memory/shared_ptr.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/shared_ptr.hpp
diff --git a/contrib/restricted/boost/boost/thread/csbl/memory/unique_ptr.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/unique_ptr.hpp
index 17abf54e92..17abf54e92 100644
--- a/contrib/restricted/boost/boost/thread/csbl/memory/unique_ptr.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/unique_ptr.hpp
diff --git a/contrib/restricted/boost/boost/thread/csbl/tuple.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/tuple.hpp
index 860229ebe0..860229ebe0 100644
--- a/contrib/restricted/boost/boost/thread/csbl/tuple.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/tuple.hpp
diff --git a/contrib/restricted/boost/boost/thread/csbl/vector.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/vector.hpp
index c77a5b143b..c77a5b143b 100644
--- a/contrib/restricted/boost/boost/thread/csbl/vector.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/vector.hpp
diff --git a/contrib/restricted/boost/boost/thread/cv_status.hpp b/contrib/restricted/boost/thread/include/boost/thread/cv_status.hpp
index e52de4a522..e52de4a522 100644
--- a/contrib/restricted/boost/boost/thread/cv_status.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/cv_status.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/atomic_redef_macros.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/atomic_redef_macros.hpp
index dfd15f5c70..dfd15f5c70 100644
--- a/contrib/restricted/boost/boost/thread/detail/atomic_redef_macros.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/atomic_redef_macros.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/atomic_undef_macros.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/atomic_undef_macros.hpp
index 18d840a7cc..18d840a7cc 100644
--- a/contrib/restricted/boost/boost/thread/detail/atomic_undef_macros.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/atomic_undef_macros.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/config.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/config.hpp
index aae25268d3..aae25268d3 100644
--- a/contrib/restricted/boost/boost/thread/detail/config.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/config.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/delete.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/delete.hpp
index 8f8113f4e8..8f8113f4e8 100644
--- a/contrib/restricted/boost/boost/thread/detail/delete.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/delete.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/invoke.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/invoke.hpp
index e772da29ee..e772da29ee 100644
--- a/contrib/restricted/boost/boost/thread/detail/invoke.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/invoke.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/invoker.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/invoker.hpp
index 9f38e9798d..9f38e9798d 100644
--- a/contrib/restricted/boost/boost/thread/detail/invoker.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/invoker.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/is_convertible.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/is_convertible.hpp
index b77620cf17..b77620cf17 100644
--- a/contrib/restricted/boost/boost/thread/detail/is_convertible.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/is_convertible.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/lockable_wrapper.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/lockable_wrapper.hpp
index 8dc5a6cc78..8dc5a6cc78 100644
--- a/contrib/restricted/boost/boost/thread/detail/lockable_wrapper.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/lockable_wrapper.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/make_tuple_indices.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/make_tuple_indices.hpp
index 73d54f11f8..73d54f11f8 100644
--- a/contrib/restricted/boost/boost/thread/detail/make_tuple_indices.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/make_tuple_indices.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/memory.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/memory.hpp
index 51ce84f40b..51ce84f40b 100644
--- a/contrib/restricted/boost/boost/thread/detail/memory.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/memory.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/move.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/move.hpp
index 800cb663cc..800cb663cc 100644
--- a/contrib/restricted/boost/boost/thread/detail/move.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/move.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/nullary_function.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/nullary_function.hpp
index b3989cf682..b3989cf682 100644
--- a/contrib/restricted/boost/boost/thread/detail/nullary_function.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/nullary_function.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/platform.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/platform.hpp
index 172a601a02..172a601a02 100644
--- a/contrib/restricted/boost/boost/thread/detail/platform.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/platform.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/platform_time.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/platform_time.hpp
index 2180f13c05..2180f13c05 100644
--- a/contrib/restricted/boost/boost/thread/detail/platform_time.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/platform_time.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/thread.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/thread.hpp
index c577184bd7..c577184bd7 100644
--- a/contrib/restricted/boost/boost/thread/detail/thread.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/thread.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/thread_group.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/thread_group.hpp
index 4105c73468..4105c73468 100644
--- a/contrib/restricted/boost/boost/thread/detail/thread_group.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/thread_group.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/thread_heap_alloc.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/thread_heap_alloc.hpp
index 2f9bfd5c0b..2f9bfd5c0b 100644
--- a/contrib/restricted/boost/boost/thread/detail/thread_heap_alloc.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/thread_heap_alloc.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/thread_interruption.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/thread_interruption.hpp
index 5d7d10fecd..5d7d10fecd 100644
--- a/contrib/restricted/boost/boost/thread/detail/thread_interruption.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/thread_interruption.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/variadic_footer.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/variadic_footer.hpp
index 9ae25a847c..9ae25a847c 100644
--- a/contrib/restricted/boost/boost/thread/detail/variadic_footer.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/variadic_footer.hpp
diff --git a/contrib/restricted/boost/boost/thread/detail/variadic_header.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/variadic_header.hpp
index 8015ae33cc..8015ae33cc 100644
--- a/contrib/restricted/boost/boost/thread/detail/variadic_header.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/variadic_header.hpp
diff --git a/contrib/restricted/boost/boost/thread/exceptional_ptr.hpp b/contrib/restricted/boost/thread/include/boost/thread/exceptional_ptr.hpp
index 49547923d9..49547923d9 100644
--- a/contrib/restricted/boost/boost/thread/exceptional_ptr.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/exceptional_ptr.hpp
diff --git a/contrib/restricted/boost/boost/thread/exceptions.hpp b/contrib/restricted/boost/thread/include/boost/thread/exceptions.hpp
index 63c1fabac3..63c1fabac3 100644
--- a/contrib/restricted/boost/boost/thread/exceptions.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/exceptions.hpp
diff --git a/contrib/restricted/boost/boost/thread/executor.hpp b/contrib/restricted/boost/thread/include/boost/thread/executor.hpp
index c2b85a0eab..c2b85a0eab 100644
--- a/contrib/restricted/boost/boost/thread/executor.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/executor.hpp
diff --git a/contrib/restricted/boost/boost/thread/executors/executor.hpp b/contrib/restricted/boost/thread/include/boost/thread/executors/executor.hpp
index 1c751dd094..1c751dd094 100644
--- a/contrib/restricted/boost/boost/thread/executors/executor.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/executors/executor.hpp
diff --git a/contrib/restricted/boost/boost/thread/executors/executor_adaptor.hpp b/contrib/restricted/boost/thread/include/boost/thread/executors/executor_adaptor.hpp
index ca1a35f2d9..ca1a35f2d9 100644
--- a/contrib/restricted/boost/boost/thread/executors/executor_adaptor.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/executors/executor_adaptor.hpp
diff --git a/contrib/restricted/boost/boost/thread/executors/generic_executor_ref.hpp b/contrib/restricted/boost/thread/include/boost/thread/executors/generic_executor_ref.hpp
index 1353dd3277..1353dd3277 100644
--- a/contrib/restricted/boost/boost/thread/executors/generic_executor_ref.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/executors/generic_executor_ref.hpp
diff --git a/contrib/restricted/boost/boost/thread/executors/work.hpp b/contrib/restricted/boost/thread/include/boost/thread/executors/work.hpp
index bdaf7651b9..bdaf7651b9 100644
--- a/contrib/restricted/boost/boost/thread/executors/work.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/executors/work.hpp
diff --git a/contrib/restricted/boost/boost/thread/future.hpp b/contrib/restricted/boost/thread/include/boost/thread/future.hpp
index e5fd1921b0..e5fd1921b0 100644
--- a/contrib/restricted/boost/boost/thread/future.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/future.hpp
diff --git a/contrib/restricted/boost/boost/thread/futures/future_error.hpp b/contrib/restricted/boost/thread/include/boost/thread/futures/future_error.hpp
index 6212deece3..6212deece3 100644
--- a/contrib/restricted/boost/boost/thread/futures/future_error.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/futures/future_error.hpp
diff --git a/contrib/restricted/boost/boost/thread/futures/future_error_code.hpp b/contrib/restricted/boost/thread/include/boost/thread/futures/future_error_code.hpp
index 7c8b6f2696..7c8b6f2696 100644
--- a/contrib/restricted/boost/boost/thread/futures/future_error_code.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/futures/future_error_code.hpp
diff --git a/contrib/restricted/boost/boost/thread/futures/future_status.hpp b/contrib/restricted/boost/thread/include/boost/thread/futures/future_status.hpp
index 383ac4673c..383ac4673c 100644
--- a/contrib/restricted/boost/boost/thread/futures/future_status.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/futures/future_status.hpp
diff --git a/contrib/restricted/boost/boost/thread/futures/is_future_type.hpp b/contrib/restricted/boost/thread/include/boost/thread/futures/is_future_type.hpp
index df7a680faa..df7a680faa 100644
--- a/contrib/restricted/boost/boost/thread/futures/is_future_type.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/futures/is_future_type.hpp
diff --git a/contrib/restricted/boost/boost/thread/futures/launch.hpp b/contrib/restricted/boost/thread/include/boost/thread/futures/launch.hpp
index 329f40d8f3..329f40d8f3 100644
--- a/contrib/restricted/boost/boost/thread/futures/launch.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/futures/launch.hpp
diff --git a/contrib/restricted/boost/boost/thread/futures/wait_for_all.hpp b/contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_all.hpp
index 398eb4adee..398eb4adee 100644
--- a/contrib/restricted/boost/boost/thread/futures/wait_for_all.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_all.hpp
diff --git a/contrib/restricted/boost/boost/thread/futures/wait_for_any.hpp b/contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_any.hpp
index b869a4318a..b869a4318a 100644
--- a/contrib/restricted/boost/boost/thread/futures/wait_for_any.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_any.hpp
diff --git a/contrib/restricted/boost/boost/thread/is_locked_by_this_thread.hpp b/contrib/restricted/boost/thread/include/boost/thread/is_locked_by_this_thread.hpp
index 6344c0ff6d..6344c0ff6d 100644
--- a/contrib/restricted/boost/boost/thread/is_locked_by_this_thread.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/is_locked_by_this_thread.hpp
diff --git a/contrib/restricted/boost/boost/thread/lock_algorithms.hpp b/contrib/restricted/boost/thread/include/boost/thread/lock_algorithms.hpp
index 7a55f92a28..7a55f92a28 100644
--- a/contrib/restricted/boost/boost/thread/lock_algorithms.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/lock_algorithms.hpp
diff --git a/contrib/restricted/boost/boost/thread/lock_guard.hpp b/contrib/restricted/boost/thread/include/boost/thread/lock_guard.hpp
index 4c2908af43..4c2908af43 100644
--- a/contrib/restricted/boost/boost/thread/lock_guard.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/lock_guard.hpp
diff --git a/contrib/restricted/boost/boost/thread/lock_options.hpp b/contrib/restricted/boost/thread/include/boost/thread/lock_options.hpp
index 68899ca89f..68899ca89f 100644
--- a/contrib/restricted/boost/boost/thread/lock_options.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/lock_options.hpp
diff --git a/contrib/restricted/boost/boost/thread/lock_types.hpp b/contrib/restricted/boost/thread/include/boost/thread/lock_types.hpp
index 9b8c57c49f..9b8c57c49f 100644
--- a/contrib/restricted/boost/boost/thread/lock_types.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/lock_types.hpp
diff --git a/contrib/restricted/boost/boost/thread/lockable_traits.hpp b/contrib/restricted/boost/thread/include/boost/thread/lockable_traits.hpp
index 2dd91639ea..f46c886629 100644
--- a/contrib/restricted/boost/boost/thread/lockable_traits.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/lockable_traits.hpp
@@ -11,7 +11,12 @@
#include <boost/assert.hpp>
#include <boost/detail/workaround.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#ifdef BOOST_NO_CXX11_SFINAE_EXPR
#include <boost/type_traits/is_class.hpp>
+#else
+#include <boost/type_traits/declval.hpp>
+#endif
#include <boost/config/abi_prefix.hpp>
@@ -33,6 +38,7 @@ namespace boost
#ifndef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
namespace detail
{
+#ifdef BOOST_NO_CXX11_SFINAE_EXPR
#define BOOST_THREAD_DEFINE_HAS_MEMBER_CALLED(member_name) \
template<typename T, bool=boost::is_class<T>::value> \
struct has_member_called_##member_name \
@@ -112,10 +118,6 @@ namespace boost
template<typename U,typename V>
static true_type has_member(V (U::*)());
-#if __cpp_noexcept_function_type
- template<typename U,typename V>
- static true_type has_member(V (U::*)() noexcept);
-#endif
template<typename U>
static false_type has_member(U);
@@ -140,16 +142,37 @@ namespace boost
template<typename U>
static true_type has_member(bool (U::*)());
-#if __cpp_noexcept_function_type
- template<typename U>
- static true_type has_member(bool (U::*)() noexcept);
-#endif
template<typename U>
static false_type has_member(U);
BOOST_STATIC_CONSTANT(
bool,value=sizeof(has_member_try_lock<T>::has_member(&T::try_lock))==sizeof(true_type));
};
+#else
+ template<typename T,typename Enabled=void>
+ struct has_member_lock : false_type {};
+
+ template<typename T>
+ struct has_member_lock<T,
+ decltype(void(boost::declval<T&>().lock()))
+ > : true_type {};
+
+ template<typename T,typename Enabled=void>
+ struct has_member_unlock : false_type {};
+
+ template<typename T>
+ struct has_member_unlock<T,
+ decltype(void(boost::declval<T&>().unlock()))
+ > : true_type {};
+
+ template<typename T,typename Enabled=bool>
+ struct has_member_try_lock : false_type {};
+
+ template<typename T>
+ struct has_member_try_lock<T,
+ decltype(bool(boost::declval<T&>().try_lock()))
+ > : true_type {};
+#endif
}
diff --git a/contrib/restricted/boost/boost/thread/locks.hpp b/contrib/restricted/boost/thread/include/boost/thread/locks.hpp
index 0905aec22a..0905aec22a 100644
--- a/contrib/restricted/boost/boost/thread/locks.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/locks.hpp
diff --git a/contrib/restricted/boost/boost/thread/mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/mutex.hpp
index 05c60941c4..05c60941c4 100644
--- a/contrib/restricted/boost/boost/thread/mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/once.hpp b/contrib/restricted/boost/thread/include/boost/thread/once.hpp
index 22f95139ae..22f95139ae 100644
--- a/contrib/restricted/boost/boost/thread/once.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/once.hpp
diff --git a/contrib/restricted/boost/boost/thread/pthread/condition_variable.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/condition_variable.hpp
index 285785ff59..285785ff59 100644
--- a/contrib/restricted/boost/boost/thread/pthread/condition_variable.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/condition_variable.hpp
diff --git a/contrib/restricted/boost/boost/thread/pthread/condition_variable_fwd.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/condition_variable_fwd.hpp
index dc471d56a0..dc471d56a0 100644
--- a/contrib/restricted/boost/boost/thread/pthread/condition_variable_fwd.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/condition_variable_fwd.hpp
diff --git a/contrib/restricted/boost/boost/thread/pthread/mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/mutex.hpp
index 6180ac5ebd..6180ac5ebd 100644
--- a/contrib/restricted/boost/boost/thread/pthread/mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/pthread/once.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/once.hpp
index 0bef0387de..0bef0387de 100644
--- a/contrib/restricted/boost/boost/thread/pthread/once.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/once.hpp
diff --git a/contrib/restricted/boost/boost/thread/pthread/once_atomic.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/once_atomic.hpp
index c54a35c541..c54a35c541 100644
--- a/contrib/restricted/boost/boost/thread/pthread/once_atomic.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/once_atomic.hpp
diff --git a/contrib/restricted/boost/boost/thread/pthread/pthread_helpers.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/pthread_helpers.hpp
index c1ff0f9239..c1ff0f9239 100644
--- a/contrib/restricted/boost/boost/thread/pthread/pthread_helpers.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/pthread_helpers.hpp
diff --git a/contrib/restricted/boost/boost/thread/pthread/pthread_mutex_scoped_lock.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
index 9b327a6c6d..9b327a6c6d 100644
--- a/contrib/restricted/boost/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
diff --git a/contrib/restricted/boost/boost/thread/pthread/recursive_mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/recursive_mutex.hpp
index ce9a8ce44b..ce9a8ce44b 100644
--- a/contrib/restricted/boost/boost/thread/pthread/recursive_mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/recursive_mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/pthread/shared_mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/shared_mutex.hpp
index ed9a296f2e..ed9a296f2e 100644
--- a/contrib/restricted/boost/boost/thread/pthread/shared_mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/shared_mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/pthread/thread_data.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/thread_data.hpp
index ea73aa7e96..859ccfbd2a 100644
--- a/contrib/restricted/boost/boost/thread/pthread/thread_data.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/thread_data.hpp
@@ -34,10 +34,6 @@
#include <pthread.h>
#include <unistd.h>
-#if defined(__APPLE__)
-extern "C" int getpagesize(void);
-#endif
-
#include <boost/config/abi_prefix.hpp>
namespace boost
diff --git a/contrib/restricted/boost/boost/thread/pthread/thread_heap_alloc.hpp b/contrib/restricted/boost/thread/include/boost/thread/pthread/thread_heap_alloc.hpp
index dec7b661d7..dec7b661d7 100644
--- a/contrib/restricted/boost/boost/thread/pthread/thread_heap_alloc.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/pthread/thread_heap_alloc.hpp
diff --git a/contrib/restricted/boost/boost/thread/recursive_mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/recursive_mutex.hpp
index e716a190ff..e716a190ff 100644
--- a/contrib/restricted/boost/boost/thread/recursive_mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/recursive_mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/shared_lock_guard.hpp b/contrib/restricted/boost/thread/include/boost/thread/shared_lock_guard.hpp
index 97a6397c1e..97a6397c1e 100644
--- a/contrib/restricted/boost/boost/thread/shared_lock_guard.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/shared_lock_guard.hpp
diff --git a/contrib/restricted/boost/boost/thread/shared_mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/shared_mutex.hpp
index 20a95d8c51..20a95d8c51 100644
--- a/contrib/restricted/boost/boost/thread/shared_mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/shared_mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/thread.hpp b/contrib/restricted/boost/thread/include/boost/thread/thread.hpp
index 3e63b42aaa..3e63b42aaa 100644
--- a/contrib/restricted/boost/boost/thread/thread.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/thread.hpp
diff --git a/contrib/restricted/boost/boost/thread/thread_only.hpp b/contrib/restricted/boost/thread/include/boost/thread/thread_only.hpp
index d408344eef..d408344eef 100644
--- a/contrib/restricted/boost/boost/thread/thread_only.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/thread_only.hpp
diff --git a/contrib/restricted/boost/boost/thread/thread_time.hpp b/contrib/restricted/boost/thread/include/boost/thread/thread_time.hpp
index ffdcf850f7..ffdcf850f7 100644
--- a/contrib/restricted/boost/boost/thread/thread_time.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/thread_time.hpp
diff --git a/contrib/restricted/boost/boost/thread/tss.hpp b/contrib/restricted/boost/thread/include/boost/thread/tss.hpp
index d798bef558..d798bef558 100644
--- a/contrib/restricted/boost/boost/thread/tss.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/tss.hpp
diff --git a/contrib/restricted/boost/boost/thread/v2/shared_mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/v2/shared_mutex.hpp
index e30a59e413..e30a59e413 100644
--- a/contrib/restricted/boost/boost/thread/v2/shared_mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/v2/shared_mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/basic_recursive_mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/basic_recursive_mutex.hpp
index 6913c5bf62..6913c5bf62 100644
--- a/contrib/restricted/boost/boost/thread/win32/basic_recursive_mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/basic_recursive_mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/basic_timed_mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/basic_timed_mutex.hpp
index b332dab752..b332dab752 100644
--- a/contrib/restricted/boost/boost/thread/win32/basic_timed_mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/basic_timed_mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/condition_variable.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/condition_variable.hpp
index 5cf975a534..5cf975a534 100644
--- a/contrib/restricted/boost/boost/thread/win32/condition_variable.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/condition_variable.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/interlocked_read.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/interlocked_read.hpp
index 775555e184..775555e184 100644
--- a/contrib/restricted/boost/boost/thread/win32/interlocked_read.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/interlocked_read.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/mutex.hpp
index 01544784b5..01544784b5 100644
--- a/contrib/restricted/boost/boost/thread/win32/mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/once.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/once.hpp
index 3c515bae7d..3c515bae7d 100644
--- a/contrib/restricted/boost/boost/thread/win32/once.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/once.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/recursive_mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/recursive_mutex.hpp
index 1f0f7f5e5f..1f0f7f5e5f 100644
--- a/contrib/restricted/boost/boost/thread/win32/recursive_mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/recursive_mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/shared_mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/shared_mutex.hpp
index 76ee2579b3..76ee2579b3 100644
--- a/contrib/restricted/boost/boost/thread/win32/shared_mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/shared_mutex.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/thread_data.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/thread_data.hpp
index f87889efa7..f87889efa7 100644
--- a/contrib/restricted/boost/boost/thread/win32/thread_data.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/thread_data.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/thread_heap_alloc.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/thread_heap_alloc.hpp
index 176d269e05..176d269e05 100644
--- a/contrib/restricted/boost/boost/thread/win32/thread_heap_alloc.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/thread_heap_alloc.hpp
diff --git a/contrib/restricted/boost/boost/thread/win32/thread_primitives.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/thread_primitives.hpp
index 5e378f7664..5e378f7664 100644
--- a/contrib/restricted/boost/boost/thread/win32/thread_primitives.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/thread_primitives.hpp
diff --git a/contrib/restricted/boost/boost/thread/xtime.hpp b/contrib/restricted/boost/thread/include/boost/thread/xtime.hpp
index 9c6a359640..9c6a359640 100644
--- a/contrib/restricted/boost/boost/thread/xtime.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/xtime.hpp
diff --git a/contrib/restricted/boost/libs/thread/src/future.cpp b/contrib/restricted/boost/thread/src/future.cpp
index 4aeac94a1b..4aeac94a1b 100644
--- a/contrib/restricted/boost/libs/thread/src/future.cpp
+++ b/contrib/restricted/boost/thread/src/future.cpp
diff --git a/contrib/restricted/boost/libs/thread/src/pthread/once.cpp b/contrib/restricted/boost/thread/src/pthread/once.cpp
index 2395cff6dd..2395cff6dd 100644
--- a/contrib/restricted/boost/libs/thread/src/pthread/once.cpp
+++ b/contrib/restricted/boost/thread/src/pthread/once.cpp
diff --git a/contrib/restricted/boost/libs/thread/src/pthread/once_atomic.cpp b/contrib/restricted/boost/thread/src/pthread/once_atomic.cpp
index 595ad7f1b3..595ad7f1b3 100644
--- a/contrib/restricted/boost/libs/thread/src/pthread/once_atomic.cpp
+++ b/contrib/restricted/boost/thread/src/pthread/once_atomic.cpp
diff --git a/contrib/restricted/boost/libs/thread/src/pthread/thread.cpp b/contrib/restricted/boost/thread/src/pthread/thread.cpp
index e856e8dcc2..1be5bae2eb 100644
--- a/contrib/restricted/boost/libs/thread/src/pthread/thread.cpp
+++ b/contrib/restricted/boost/thread/src/pthread/thread.cpp
@@ -28,7 +28,7 @@
#endif
#if defined(__VXWORKS__)
-#error #include <vxCpuLib.h>
+#include <vxCpuLib.h>
#endif
#include <boost/algorithm/string/split.hpp>
diff --git a/contrib/restricted/thrift/CMakeLists.txt b/contrib/restricted/thrift/CMakeLists.txt
index 53b2ff3c15..0e1e065b9f 100644
--- a/contrib/restricted/thrift/CMakeLists.txt
+++ b/contrib/restricted/thrift/CMakeLists.txt
@@ -28,7 +28,7 @@ target_link_libraries(contrib-restricted-thrift PUBLIC
ZLIB::ZLIB
contrib-restricted-boost
restricted-boost-system
- boost-libs-thread
+ restricted-boost-thread
)
target_sources(contrib-restricted-thrift PRIVATE
${CMAKE_SOURCE_DIR}/contrib/restricted/thrift/thrift/TApplicationException.cpp