passenger 6.0.16 → 6.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +22 -1
- data/build/integration_tests.rb +6 -6
- data/build/ruby_tests.rb +1 -1
- data/build/test_basics.rb +0 -1
- data/src/agent/Core/Config.h +1 -1
- data/src/agent/Core/Controller/Config.h +1 -1
- data/src/agent/Core/SpawningKit/PipeWatcher.h +18 -3
- data/src/agent/Watchdog/Config.h +1 -1
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/align/aligned_alloc.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/array.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_executor.hpp +344 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_handler.hpp +686 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/any_io_executor.hpp +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_allocator.hpp +81 -25
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_cancellation_slot.hpp +68 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_executor.hpp +46 -11
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_file.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_random_access_file.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_readable_pipe.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_file.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_writable_pipe.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_allocator.hpp +13 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_cancellation_slot.hpp +14 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +13 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +30 -305
- data/src/cxx_supportlib/vendor-modified/boost/asio/consign.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp +17 -18
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +98 -24
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/composed_work.hpp +330 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +81 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_work.hpp +19 -11
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +37 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +10 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.hpp +14 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +18 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/utility.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/work_dispatcher.hpp +7 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/dispatch.hpp +4 -14
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +22 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/any_executor.hpp +447 -142
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +57 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +51 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_execute.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_guarantee.hpp +41 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/connect.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +13 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context_as.hpp +13 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_operation.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/execute.hpp +9 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/executor.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +52 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +13 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/operation_state.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +39 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +39 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/schedule.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/scheduler.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/sender.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_done.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_error.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_value.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/start.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/submit.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/executor_work_guard.hpp +6 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_channel.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_concurrent_channel.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_traits.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_composed.hpp +146 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro.hpp +35 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_handler.hpp +13 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_operation.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_service.hpp +180 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_completion_handler.hpp +171 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_promise_allocator.hpp +89 -66
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/partial_promise.hpp +66 -45
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/as_single.hpp +13 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/co_composed.hpp +1134 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/coro.hpp +130 -106
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/parallel_group.hpp +377 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/promise.hpp +168 -29
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_coro.hpp +149 -203
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_promise.hpp +68 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/parallel_group.hpp +256 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/promise.hpp +76 -80
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_coro.hpp +40 -14
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_promise.hpp +113 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_completion_executor.ipp +132 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_io_executor.ipp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/append.hpp +12 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/as_tuple.hpp +12 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +25 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +25 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +34 -45
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +28 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/consign.hpp +204 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/defer.hpp +33 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/deferred.hpp +13 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/dispatch.hpp +21 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/post.hpp +33 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/prepend.hpp +12 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +40 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +27 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +104 -24
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/redirect_error.hpp +12 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +70 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +38 -30
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +27 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_context.hpp +0 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.ipp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.ipp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/post.hpp +17 -18
- data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +13 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +11 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/system_executor.hpp +0 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +23 -18
- data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_overlapped_handle.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/chrono/config.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/chrono.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/scan_keyword.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_io.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_put.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_units.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_io.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/ios_base_state_ptr.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/chrono/time_point.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/details.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +10 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang_version.hpp +9 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +9 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +6 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +8 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/detail/suffix.hpp +33 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/header_deprecated.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +29 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +13 -13
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +80 -95
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +10 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_end.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +738 -34
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/destroyers.hpp +38 -10
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterator.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +3 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +1150 -1213
- data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +104 -12
- data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +31 -331
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_mix.hpp +113 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_range.hpp +173 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_tuple.hpp +133 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +461 -566
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_fwd.hpp +24 -24
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_contiguous_range.hpp +91 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_described_class.hpp +38 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_range.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_unordered_range.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/bit.hpp +32 -4
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/string_view.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/empty_value.hpp +16 -16
- data/src/cxx_supportlib/vendor-modified/boost/core/fclose_deleter.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/formatters.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/formatters_limited.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_date.hpp +12 -13
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/parsers.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.ipp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/iso_format.hpp +13 -13
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_date_time.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_formatters.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_formatters_limited.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/special_values_parser.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_parsing.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/describe/bases.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/describe/detail/config.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/describe/detail/cx_streq.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/describe/detail/void_t.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/describe/members.hpp +159 -0
- data/src/cxx_supportlib/vendor-modified/boost/describe/modifiers.hpp +33 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +45 -45
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/bstree_algorithms_base.hpp +37 -38
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +145 -90
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pack_options.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree_algorithms.hpp +11 -9
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_facade.hpp +106 -25
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +8 -5
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/pdqsort.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +8 -4
- data/src/cxx_supportlib/vendor-modified/boost/mp11/bind.hpp +111 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/int_float_mixture.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/sign_mixture.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/udt_builtin_mixture.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/has_opt.hpp +6 -2
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp +11 -2
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +7 -1
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category_impl.hpp +10 -1
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.hpp +38 -43
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_condition.hpp +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_ptr_helper.hpp +27 -27
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp +27 -27
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/intrinsics.hpp +22 -8
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fca.hpp +37 -7
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa.hpp +1921 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +66 -82
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/prime_fmod.hpp +6 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/type_traits.hpp +109 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/xmx.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/hash_traits.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +732 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map_fwd.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +586 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set_fwd.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +166 -66
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +145 -28
- data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/md5.hpp +1 -1
- data/src/ruby_native_extension/extconf.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger.rb +5 -5
- metadata +36 -19
- data/src/cxx_supportlib/vendor-modified/boost/align/align.hpp +0 -19
- data/src/cxx_supportlib/vendor-modified/boost/align/alignment_of.hpp +0 -54
- data/src/cxx_supportlib/vendor-modified/boost/align/alignment_of_forward.hpp +0 -20
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp +0 -21
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/aligned_alloc.hpp +0 -52
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/alignment_of.hpp +0 -31
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/alignment_of_cxx11.hpp +0 -23
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/element_type.hpp +0 -91
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/integral_constant.hpp +0 -53
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/min_size.hpp +0 -26
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/completion_handler_erasure.hpp +0 -196
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/compose.hpp +0 -709
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/float_functions.hpp +0 -336
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_float.hpp +0 -271
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp +0 -62
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/extensions.hpp +0 -361
- data/src/cxx_supportlib/vendor-modified/boost/detail/container_fwd.hpp +0 -157
data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_concurrent_channel.hpp
CHANGED
@@ -290,7 +290,7 @@ public:
|
|
290
290
|
}
|
291
291
|
|
292
292
|
/// Get the executor associated with the object.
|
293
|
-
executor_type get_executor() BOOST_ASIO_NOEXCEPT
|
293
|
+
const executor_type& get_executor() BOOST_ASIO_NOEXCEPT
|
294
294
|
{
|
295
295
|
return executor_;
|
296
296
|
}
|
@@ -427,7 +427,7 @@ private:
|
|
427
427
|
{
|
428
428
|
}
|
429
429
|
|
430
|
-
executor_type get_executor() const BOOST_ASIO_NOEXCEPT
|
430
|
+
const executor_type& get_executor() const BOOST_ASIO_NOEXCEPT
|
431
431
|
{
|
432
432
|
return self_->get_executor();
|
433
433
|
}
|
@@ -456,7 +456,7 @@ private:
|
|
456
456
|
{
|
457
457
|
}
|
458
458
|
|
459
|
-
executor_type get_executor() const BOOST_ASIO_NOEXCEPT
|
459
|
+
const executor_type& get_executor() const BOOST_ASIO_NOEXCEPT
|
460
460
|
{
|
461
461
|
return self_->get_executor();
|
462
462
|
}
|
@@ -82,6 +82,40 @@ struct channel_traits
|
|
82
82
|
};
|
83
83
|
};
|
84
84
|
|
85
|
+
template <typename R>
|
86
|
+
struct channel_traits<R(boost::system::error_code)>
|
87
|
+
{
|
88
|
+
template <typename... NewSignatures>
|
89
|
+
struct rebind
|
90
|
+
{
|
91
|
+
typedef channel_traits<NewSignatures...> other;
|
92
|
+
};
|
93
|
+
|
94
|
+
template <typename Element>
|
95
|
+
struct container
|
96
|
+
{
|
97
|
+
typedef std::deque<Element> type;
|
98
|
+
};
|
99
|
+
|
100
|
+
typedef R receive_cancelled_signature(boost::system::error_code);
|
101
|
+
|
102
|
+
template <typename F>
|
103
|
+
static void invoke_receive_cancelled(F f)
|
104
|
+
{
|
105
|
+
const boost::system::error_code e = error::channel_cancelled;
|
106
|
+
BOOST_ASIO_MOVE_OR_LVALUE(F)(f)(e);
|
107
|
+
}
|
108
|
+
|
109
|
+
typedef R receive_closed_signature(boost::system::error_code);
|
110
|
+
|
111
|
+
template <typename F>
|
112
|
+
static void invoke_receive_closed(F f)
|
113
|
+
{
|
114
|
+
const boost::system::error_code e = error::channel_closed;
|
115
|
+
BOOST_ASIO_MOVE_OR_LVALUE(F)(f)(e);
|
116
|
+
}
|
117
|
+
};
|
118
|
+
|
85
119
|
template <typename R, typename... Args, typename... Signatures>
|
86
120
|
struct channel_traits<R(boost::system::error_code, Args...), Signatures...>
|
87
121
|
{
|
@@ -116,6 +150,42 @@ struct channel_traits<R(boost::system::error_code, Args...), Signatures...>
|
|
116
150
|
}
|
117
151
|
};
|
118
152
|
|
153
|
+
template <typename R>
|
154
|
+
struct channel_traits<R(std::exception_ptr)>
|
155
|
+
{
|
156
|
+
template <typename... NewSignatures>
|
157
|
+
struct rebind
|
158
|
+
{
|
159
|
+
typedef channel_traits<NewSignatures...> other;
|
160
|
+
};
|
161
|
+
|
162
|
+
template <typename Element>
|
163
|
+
struct container
|
164
|
+
{
|
165
|
+
typedef std::deque<Element> type;
|
166
|
+
};
|
167
|
+
|
168
|
+
typedef R receive_cancelled_signature(std::exception_ptr);
|
169
|
+
|
170
|
+
template <typename F>
|
171
|
+
static void invoke_receive_cancelled(F f)
|
172
|
+
{
|
173
|
+
const boost::system::error_code e = error::channel_cancelled;
|
174
|
+
BOOST_ASIO_MOVE_OR_LVALUE(F)(f)(
|
175
|
+
std::make_exception_ptr(boost::system::system_error(e)));
|
176
|
+
}
|
177
|
+
|
178
|
+
typedef R receive_closed_signature(std::exception_ptr);
|
179
|
+
|
180
|
+
template <typename F>
|
181
|
+
static void invoke_receive_closed(F f)
|
182
|
+
{
|
183
|
+
const boost::system::error_code e = error::channel_closed;
|
184
|
+
BOOST_ASIO_MOVE_OR_LVALUE(F)(f)(
|
185
|
+
std::make_exception_ptr(boost::system::system_error(e)));
|
186
|
+
}
|
187
|
+
};
|
188
|
+
|
119
189
|
template <typename R, typename... Args, typename... Signatures>
|
120
190
|
struct channel_traits<R(std::exception_ptr, Args...), Signatures...>
|
121
191
|
{
|
@@ -0,0 +1,146 @@
|
|
1
|
+
//
|
2
|
+
// experimental/co_composed.hpp
|
3
|
+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
4
|
+
//
|
5
|
+
// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
|
6
|
+
//
|
7
|
+
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
8
|
+
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
9
|
+
//
|
10
|
+
|
11
|
+
#ifndef BOOST_ASIO_EXPERIMENTAL_CO_COMPOSED_HPP
|
12
|
+
#define BOOST_ASIO_EXPERIMENTAL_CO_COMPOSED_HPP
|
13
|
+
|
14
|
+
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
15
|
+
# pragma once
|
16
|
+
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
|
17
|
+
|
18
|
+
#include <boost/asio/detail/config.hpp>
|
19
|
+
#include <boost/asio/async_result.hpp>
|
20
|
+
|
21
|
+
#include <boost/asio/detail/push_options.hpp>
|
22
|
+
|
23
|
+
namespace boost {
|
24
|
+
namespace asio {
|
25
|
+
namespace experimental {
|
26
|
+
|
27
|
+
/// Creates an initiation function object that may be used to launch a
|
28
|
+
/// coroutine-based composed asynchronous operation.
|
29
|
+
/**
|
30
|
+
* The experimental::co_composed utility simplifies the implementation of
|
31
|
+
* composed asynchronous operations by automatically adapting a coroutine to be
|
32
|
+
* an initiation function object for use with @c async_initiate. When awaiting
|
33
|
+
* asynchronous operations, the coroutine automatically uses a conforming
|
34
|
+
* intermediate completion handler.
|
35
|
+
*
|
36
|
+
* @param implementation A function object that contains the coroutine-based
|
37
|
+
* implementation of the composed asynchronous operation. The first argument to
|
38
|
+
* the function object represents the state of the operation, and may be used
|
39
|
+
* to test for cancellation. The remaining arguments are those passed to @c
|
40
|
+
* async_initiate after the completion token.
|
41
|
+
*
|
42
|
+
* @param io_objects_or_executors Zero or more I/O objects or I/O executors for
|
43
|
+
* which outstanding work must be maintained while the operation is incomplete.
|
44
|
+
*
|
45
|
+
* @par Per-Operation Cancellation
|
46
|
+
* By default, per-operation cancellation is disabled for composed operations
|
47
|
+
* that use experimental::co_composed. It must be explicitly enabled by calling
|
48
|
+
* the state's @c reset_cancellation_state function.
|
49
|
+
*
|
50
|
+
* @par Examples
|
51
|
+
* The following example illustrates manual error handling and explicit checks
|
52
|
+
* for cancellation. The completion handler is invoked via a @c co_yield to the
|
53
|
+
* state's @c complete function, which never returns.
|
54
|
+
*
|
55
|
+
* @code template <typename CompletionToken>
|
56
|
+
* auto async_echo(tcp::socket& socket,
|
57
|
+
* CompletionToken&& token)
|
58
|
+
* {
|
59
|
+
* return boost::asio::async_initiate<
|
60
|
+
* CompletionToken, void(boost::system::error_code)>(
|
61
|
+
* boost::asio::experimental::co_composed(
|
62
|
+
* [](auto state, tcp::socket& socket) -> void
|
63
|
+
* {
|
64
|
+
* state.reset_cancellation_state(
|
65
|
+
* boost::asio::enable_terminal_cancellation());
|
66
|
+
*
|
67
|
+
* while (!state.cancelled())
|
68
|
+
* {
|
69
|
+
* char data[1024];
|
70
|
+
* auto [e1, n1] =
|
71
|
+
* co_await socket.async_read_some(
|
72
|
+
* boost::asio::buffer(data),
|
73
|
+
* boost::asio::as_tuple(boost::asio::deferred));
|
74
|
+
*
|
75
|
+
* if (e1)
|
76
|
+
* co_yield state.complete(e1);
|
77
|
+
*
|
78
|
+
* if (!!state.cancelled())
|
79
|
+
* co_yield state.complete(
|
80
|
+
* make_error_code(boost::asio::error::operation_aborted));
|
81
|
+
*
|
82
|
+
* auto [e2, n2] =
|
83
|
+
* co_await boost::asio::async_write(socket,
|
84
|
+
* boost::asio::buffer(data, n1),
|
85
|
+
* boost::asio::as_tuple(boost::asio::deferred));
|
86
|
+
*
|
87
|
+
* if (e2)
|
88
|
+
* co_yield state.complete(e2);
|
89
|
+
* }
|
90
|
+
* }, socket),
|
91
|
+
* token, std::ref(socket));
|
92
|
+
* } @endcode
|
93
|
+
*
|
94
|
+
* This next example shows exception-based error handling and implicit checks
|
95
|
+
* for cancellation. The completion handler is invoked after returning from the
|
96
|
+
* coroutine via @c co_return. Valid @c co_return values are specified using
|
97
|
+
* completion signatures passed to the @c co_composed function.
|
98
|
+
*
|
99
|
+
* @code template <typename CompletionToken>
|
100
|
+
* auto async_echo(tcp::socket& socket,
|
101
|
+
* CompletionToken&& token)
|
102
|
+
* {
|
103
|
+
* return boost::asio::async_initiate<
|
104
|
+
* CompletionToken, void(boost::system::error_code)>(
|
105
|
+
* boost::asio::experimental::co_composed<
|
106
|
+
* void(boost::system::error_code)>(
|
107
|
+
* [](auto state, tcp::socket& socket) -> void
|
108
|
+
* {
|
109
|
+
* try
|
110
|
+
* {
|
111
|
+
* state.throw_if_cancelled(true);
|
112
|
+
* state.reset_cancellation_state(
|
113
|
+
* boost::asio::enable_terminal_cancellation());
|
114
|
+
*
|
115
|
+
* for (;;)
|
116
|
+
* {
|
117
|
+
* char data[1024];
|
118
|
+
* std::size_t n = co_await socket.async_read_some(
|
119
|
+
* boost::asio::buffer(data), boost::asio::deferred);
|
120
|
+
*
|
121
|
+
* co_await boost::asio::async_write(socket,
|
122
|
+
* boost::asio::buffer(data, n), boost::asio::deferred);
|
123
|
+
* }
|
124
|
+
* }
|
125
|
+
* catch (const std::system_error& e)
|
126
|
+
* {
|
127
|
+
* co_return {e.code()};
|
128
|
+
* }
|
129
|
+
* }, socket),
|
130
|
+
* token, std::ref(socket));
|
131
|
+
* } @endcode
|
132
|
+
*/
|
133
|
+
template <completion_signature... Signatures,
|
134
|
+
typename Implementation, typename... IoObjectsOrExecutors>
|
135
|
+
auto co_composed(Implementation&& implementation,
|
136
|
+
IoObjectsOrExecutors&&... io_objects_or_executors);
|
137
|
+
|
138
|
+
} // namespace experimental
|
139
|
+
} // namespace asio
|
140
|
+
} // namespace boost
|
141
|
+
|
142
|
+
#include <boost/asio/detail/pop_options.hpp>
|
143
|
+
|
144
|
+
#include <boost/asio/experimental/impl/co_composed.hpp>
|
145
|
+
|
146
|
+
#endif // BOOST_ASIO_EXPERIMENTAL_CO_COMPOSED_HPP
|
@@ -23,7 +23,6 @@
|
|
23
23
|
#include <boost/asio/experimental/coro_traits.hpp>
|
24
24
|
#include <boost/asio/experimental/detail/coro_promise_allocator.hpp>
|
25
25
|
#include <boost/asio/experimental/detail/partial_promise.hpp>
|
26
|
-
#include <boost/asio/experimental/use_coro.hpp>
|
27
26
|
#include <boost/asio/post.hpp>
|
28
27
|
|
29
28
|
#include <boost/asio/detail/push_options.hpp>
|
@@ -33,6 +32,10 @@ namespace asio {
|
|
33
32
|
namespace experimental {
|
34
33
|
namespace detail {
|
35
34
|
|
35
|
+
template <typename Signature, typename Return,
|
36
|
+
typename Executor, typename Allocator>
|
37
|
+
struct coro_promise;
|
38
|
+
|
36
39
|
template <typename T, typename Coroutine>
|
37
40
|
struct coro_with_arg;
|
38
41
|
|
@@ -45,7 +48,8 @@ struct coro_with_arg;
|
|
45
48
|
* the underlying executor type.
|
46
49
|
*/
|
47
50
|
template <typename Yield = void, typename Return = void,
|
48
|
-
typename Executor = any_io_executor
|
51
|
+
typename Executor = any_io_executor,
|
52
|
+
typename Allocator = std::allocator<void>>
|
49
53
|
struct coro
|
50
54
|
{
|
51
55
|
/// The traits of the coroutine. See boost::asio::experimental::coro_traits
|
@@ -79,7 +83,7 @@ struct coro
|
|
79
83
|
using completion_handler = typename traits::completion_handler;
|
80
84
|
|
81
85
|
/// The internal promise-type of the coroutine.
|
82
|
-
using promise_type = detail::coro_promise<Yield, Return, Executor>;
|
86
|
+
using promise_type = detail::coro_promise<Yield, Return, Executor, Allocator>;
|
83
87
|
|
84
88
|
#if !defined(GENERATING_DOCUMENTATION)
|
85
89
|
template <typename T, typename Coroutine>
|
@@ -89,8 +93,11 @@ struct coro
|
|
89
93
|
/// The executor type.
|
90
94
|
using executor_type = Executor;
|
91
95
|
|
96
|
+
/// The allocator type.
|
97
|
+
using allocator_type = Allocator;
|
98
|
+
|
92
99
|
#if !defined(GENERATING_DOCUMENTATION)
|
93
|
-
friend struct detail::coro_promise<Yield, Return, Executor>;
|
100
|
+
friend struct detail::coro_promise<Yield, Return, Executor, Allocator>;
|
94
101
|
#endif // !defined(GENERATING_DOCUMENTATION)
|
95
102
|
|
96
103
|
/// The default constructor, gives an invalid coroutine.
|
@@ -102,7 +109,7 @@ struct coro
|
|
102
109
|
{
|
103
110
|
}
|
104
111
|
|
105
|
-
coro(const coro
|
112
|
+
coro(const coro&) = delete;
|
106
113
|
|
107
114
|
/// Move assignment.
|
108
115
|
coro& operator=(coro&& lhs) noexcept
|
@@ -166,6 +173,19 @@ struct coro
|
|
166
173
|
throw std::logic_error("Coroutine has no executor");
|
167
174
|
}
|
168
175
|
|
176
|
+
/// Get the used allocator.
|
177
|
+
allocator_type get_allocator() const
|
178
|
+
{
|
179
|
+
if (coro_)
|
180
|
+
return coro_->get_allocator();
|
181
|
+
|
182
|
+
if constexpr (std::is_default_constructible_v<Allocator>)
|
183
|
+
return Allocator{};
|
184
|
+
else
|
185
|
+
throw std::logic_error(
|
186
|
+
"Coroutine has no available allocator without a constructed promise");
|
187
|
+
}
|
188
|
+
|
169
189
|
/// Resume the coroutine.
|
170
190
|
/**
|
171
191
|
* @param token The completion token of the async resume.
|
@@ -254,6 +274,16 @@ private:
|
|
254
274
|
promise_type* coro_{nullptr};
|
255
275
|
};
|
256
276
|
|
277
|
+
/// A generator is a coro that returns void and yields value.
|
278
|
+
template<typename T, typename Executor = boost::asio::any_io_executor,
|
279
|
+
typename Allocator = std::allocator<void>>
|
280
|
+
using generator = coro<T, void, Executor, Allocator>;
|
281
|
+
|
282
|
+
/// A task is a coro that does not yield values
|
283
|
+
template<typename T, typename Executor = boost::asio::any_io_executor,
|
284
|
+
typename Allocator = std::allocator<void>>
|
285
|
+
using task = coro<void(), T, Executor, Allocator>;
|
286
|
+
|
257
287
|
} // namespace experimental
|
258
288
|
} // namespace asio
|
259
289
|
} // namespace boost
|
@@ -56,9 +56,19 @@ struct associator<Associator,
|
|
56
56
|
DefaultCandidate>
|
57
57
|
: Associator<Handler, DefaultCandidate>
|
58
58
|
{
|
59
|
-
static typename Associator<Handler, DefaultCandidate>::type
|
60
|
-
|
61
|
-
|
59
|
+
static typename Associator<Handler, DefaultCandidate>::type
|
60
|
+
get(const experimental::detail::channel_handler<Payload, Handler>& h)
|
61
|
+
BOOST_ASIO_NOEXCEPT
|
62
|
+
{
|
63
|
+
return Associator<Handler, DefaultCandidate>::get(h.handler_);
|
64
|
+
}
|
65
|
+
|
66
|
+
static BOOST_ASIO_AUTO_RETURN_TYPE_PREFIX2(
|
67
|
+
typename Associator<Handler, DefaultCandidate>::type)
|
68
|
+
get(const experimental::detail::channel_handler<Payload, Handler>& h,
|
69
|
+
const DefaultCandidate& c) BOOST_ASIO_NOEXCEPT
|
70
|
+
BOOST_ASIO_AUTO_RETURN_TYPE_SUFFIX((
|
71
|
+
Associator<Handler, DefaultCandidate>::get(h.handler_, c)))
|
62
72
|
{
|
63
73
|
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
|
64
74
|
}
|
data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_operation.hpp
CHANGED
@@ -94,11 +94,18 @@ public:
|
|
94
94
|
typename associated_allocator<Handler>::type allocator =
|
95
95
|
(get_associated_allocator)(handler);
|
96
96
|
|
97
|
+
#if defined(BOOST_ASIO_NO_DEPRECATED)
|
98
|
+
boost::asio::prefer(
|
99
|
+
boost::asio::require(executor_, execution::blocking.never),
|
100
|
+
execution::allocator(allocator)
|
101
|
+
).execute(BOOST_ASIO_MOVE_CAST(Function)(function));
|
102
|
+
#else // defined(BOOST_ASIO_NO_DEPRECATED)
|
97
103
|
execution::execute(
|
98
104
|
boost::asio::prefer(
|
99
105
|
boost::asio::require(executor_, execution::blocking.never),
|
100
106
|
execution::allocator(allocator)),
|
101
107
|
BOOST_ASIO_MOVE_CAST(Function)(function));
|
108
|
+
#endif // defined(BOOST_ASIO_NO_DEPRECATED)
|
102
109
|
}
|
103
110
|
|
104
111
|
private:
|
@@ -487,6 +487,186 @@ private:
|
|
487
487
|
std::size_t buffer_;
|
488
488
|
};
|
489
489
|
|
490
|
+
// The implementation for an error_code signature.
|
491
|
+
template <typename Mutex>
|
492
|
+
template <typename Traits, typename R>
|
493
|
+
struct channel_service<Mutex>::implementation_type<
|
494
|
+
Traits, R(boost::system::error_code)>
|
495
|
+
: channel_service::base_implementation_type
|
496
|
+
{
|
497
|
+
// The traits type associated with the channel.
|
498
|
+
typedef typename Traits::template rebind<R(boost::system::error_code)>::other
|
499
|
+
traits_type;
|
500
|
+
|
501
|
+
// Type of an element stored in the buffer.
|
502
|
+
typedef typename conditional<
|
503
|
+
has_signature<
|
504
|
+
typename traits_type::receive_cancelled_signature,
|
505
|
+
R(boost::system::error_code)
|
506
|
+
>::value,
|
507
|
+
typename conditional<
|
508
|
+
has_signature<
|
509
|
+
typename traits_type::receive_closed_signature,
|
510
|
+
R(boost::system::error_code)
|
511
|
+
>::value,
|
512
|
+
channel_payload<R(boost::system::error_code)>,
|
513
|
+
channel_payload<
|
514
|
+
R(boost::system::error_code),
|
515
|
+
typename traits_type::receive_closed_signature
|
516
|
+
>
|
517
|
+
>::type,
|
518
|
+
typename conditional<
|
519
|
+
has_signature<
|
520
|
+
typename traits_type::receive_closed_signature,
|
521
|
+
R(boost::system::error_code),
|
522
|
+
typename traits_type::receive_cancelled_signature
|
523
|
+
>::value,
|
524
|
+
channel_payload<
|
525
|
+
R(boost::system::error_code),
|
526
|
+
typename traits_type::receive_cancelled_signature
|
527
|
+
>,
|
528
|
+
channel_payload<
|
529
|
+
R(boost::system::error_code),
|
530
|
+
typename traits_type::receive_cancelled_signature,
|
531
|
+
typename traits_type::receive_closed_signature
|
532
|
+
>
|
533
|
+
>::type
|
534
|
+
>::type payload_type;
|
535
|
+
|
536
|
+
// Construct with empty buffer.
|
537
|
+
implementation_type()
|
538
|
+
: size_(0)
|
539
|
+
{
|
540
|
+
}
|
541
|
+
|
542
|
+
// Move from another buffer.
|
543
|
+
void buffer_move_from(implementation_type& other)
|
544
|
+
{
|
545
|
+
size_ = other.buffer_;
|
546
|
+
other.size_ = 0;
|
547
|
+
first_ = other.first_;
|
548
|
+
other.first.count_ = 0;
|
549
|
+
rest_ = BOOST_ASIO_MOVE_CAST(
|
550
|
+
typename traits_type::template container<
|
551
|
+
buffered_value>::type)(other.rest_);
|
552
|
+
other.buffer_clear();
|
553
|
+
}
|
554
|
+
|
555
|
+
// Get number of buffered elements.
|
556
|
+
std::size_t buffer_size() const
|
557
|
+
{
|
558
|
+
return size_;
|
559
|
+
}
|
560
|
+
|
561
|
+
// Push a new value to the back of the buffer.
|
562
|
+
void buffer_push(payload_type payload)
|
563
|
+
{
|
564
|
+
buffered_value& last = rest_.empty() ? first_ : rest_.back();
|
565
|
+
if (last.count_ == 0)
|
566
|
+
{
|
567
|
+
value_handler handler{last.value_};
|
568
|
+
payload.receive(handler);
|
569
|
+
last.count_ = 1;
|
570
|
+
}
|
571
|
+
else
|
572
|
+
{
|
573
|
+
boost::system::error_code value{last.value_};
|
574
|
+
value_handler handler{value};
|
575
|
+
payload.receive(handler);
|
576
|
+
if (last.value_ == value)
|
577
|
+
++last.count_;
|
578
|
+
else
|
579
|
+
rest_.push_back({value, 1});
|
580
|
+
}
|
581
|
+
++size_;
|
582
|
+
}
|
583
|
+
|
584
|
+
// Push new values to the back of the buffer.
|
585
|
+
std::size_t buffer_push_n(std::size_t count, payload_type payload)
|
586
|
+
{
|
587
|
+
std::size_t available = this->max_buffer_size_ - size_;
|
588
|
+
count = (count < available) ? count : available;
|
589
|
+
if (count > 0)
|
590
|
+
{
|
591
|
+
buffered_value& last = rest_.empty() ? first_ : rest_.back();
|
592
|
+
if (last.count_ == 0)
|
593
|
+
{
|
594
|
+
payload.receive(value_handler{last.value_});
|
595
|
+
last.count_ = count;
|
596
|
+
}
|
597
|
+
else
|
598
|
+
{
|
599
|
+
boost::system::error_code value{last.value_};
|
600
|
+
payload.receive(value_handler{value});
|
601
|
+
if (last.value_ == value)
|
602
|
+
last.count_ += count;
|
603
|
+
else
|
604
|
+
rest_.push_back({value, count});
|
605
|
+
}
|
606
|
+
size_ += count;
|
607
|
+
}
|
608
|
+
return count;
|
609
|
+
}
|
610
|
+
|
611
|
+
// Get the element at the front of the buffer.
|
612
|
+
payload_type buffer_front()
|
613
|
+
{
|
614
|
+
return payload_type({0, first_.value_});
|
615
|
+
}
|
616
|
+
|
617
|
+
// Pop a value from the front of the buffer.
|
618
|
+
void buffer_pop()
|
619
|
+
{
|
620
|
+
--size_;
|
621
|
+
if (--first_.count_ == 0 && !rest_.empty())
|
622
|
+
{
|
623
|
+
first_ = rest_.front();
|
624
|
+
rest_.pop_front();
|
625
|
+
}
|
626
|
+
}
|
627
|
+
|
628
|
+
// Clear all values from the buffer.
|
629
|
+
void buffer_clear()
|
630
|
+
{
|
631
|
+
size_ = 0;
|
632
|
+
first_.count_ == 0;
|
633
|
+
rest_.clear();
|
634
|
+
}
|
635
|
+
|
636
|
+
private:
|
637
|
+
struct buffered_value
|
638
|
+
{
|
639
|
+
boost::system::error_code value_;
|
640
|
+
std::size_t count_ = 0;
|
641
|
+
};
|
642
|
+
|
643
|
+
struct value_handler
|
644
|
+
{
|
645
|
+
boost::system::error_code& target_;
|
646
|
+
|
647
|
+
template <typename... Args>
|
648
|
+
void operator()(const boost::system::error_code& value, Args&&...)
|
649
|
+
{
|
650
|
+
target_ = value;
|
651
|
+
}
|
652
|
+
};
|
653
|
+
|
654
|
+
buffered_value& last_value()
|
655
|
+
{
|
656
|
+
return rest_.empty() ? first_ : rest_.back();
|
657
|
+
}
|
658
|
+
|
659
|
+
// Total number of buffered values.
|
660
|
+
std::size_t size_;
|
661
|
+
|
662
|
+
// The first buffered value is maintained as a separate data member to avoid
|
663
|
+
// allocating space in the container in the common case.
|
664
|
+
buffered_value first_;
|
665
|
+
|
666
|
+
// The rest of the buffered values.
|
667
|
+
typename traits_type::template container<buffered_value>::type rest_;
|
668
|
+
};
|
669
|
+
|
490
670
|
} // namespace detail
|
491
671
|
} // namespace experimental
|
492
672
|
} // namespace asio
|