passenger 6.0.15 → 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 +46 -2
- 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/jsoncpp/json-forwards.h +143 -261
- data/src/cxx_supportlib/vendor-modified/jsoncpp/json.h +763 -947
- data/src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp +1477 -1487
- 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/packaging.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +5 -5
- 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
@@ -16,247 +16,193 @@
|
|
16
16
|
# pragma once
|
17
17
|
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
|
18
18
|
|
19
|
+
#include <boost/asio/deferred.hpp>
|
20
|
+
#include <boost/asio/experimental/coro.hpp>
|
21
|
+
|
19
22
|
#include <boost/asio/detail/push_options.hpp>
|
20
23
|
|
21
24
|
namespace boost {
|
22
25
|
namespace asio {
|
23
|
-
namespace experimental {
|
24
|
-
|
25
|
-
template <typename Yield, typename Return, typename Executor>
|
26
|
-
struct coro;
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
template <typename Yield, typename Return, typename Executor>
|
31
|
-
struct coro_promise;
|
27
|
+
#if !defined(GENERATING_DOCUMENTATION)
|
32
28
|
|
33
|
-
template <typename
|
34
|
-
struct
|
29
|
+
template <typename Allocator, typename R>
|
30
|
+
struct async_result<experimental::use_coro_t<Allocator>, R()>
|
35
31
|
{
|
36
|
-
|
32
|
+
template <typename Initiation, typename... InitArgs>
|
33
|
+
static auto initiate_impl(Initiation initiation,
|
34
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
35
|
+
-> experimental::coro<void() noexcept, void,
|
36
|
+
boost::asio::associated_executor_t<Initiation>, Allocator>
|
37
37
|
{
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
co_await deferred_async_operation<R(), Initiation, InitArgs...>(
|
39
|
+
deferred_init_tag{}, std::move(initiation), std::move(args)...);
|
40
|
+
}
|
41
41
|
|
42
|
-
|
42
|
+
template <typename... InitArgs>
|
43
|
+
static auto initiate_impl(boost::asio::detail::initiation_archetype<R()>,
|
44
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
45
|
+
-> experimental::coro<void(), void,
|
46
|
+
boost::asio::any_io_executor, Allocator>;
|
43
47
|
|
44
|
-
|
48
|
+
template <typename Initiation, typename... InitArgs>
|
49
|
+
static auto initiate(Initiation initiation,
|
50
|
+
experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
|
45
51
|
{
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
void return_void() {}
|
51
|
-
|
52
|
-
void unhandled_exception() { assert(false); }
|
53
|
-
|
54
|
-
auto await_transform(handler_t)
|
55
|
-
{
|
56
|
-
assert(executor);
|
57
|
-
assert(h);
|
58
|
-
return init_helper{this};
|
59
|
-
}
|
60
|
-
|
61
|
-
std::optional<Executor> executor;
|
62
|
-
std::optional<std::tuple<Ts...>> result;
|
63
|
-
coroutine_handle<> h;
|
64
|
-
|
65
|
-
coro_init_handler get_return_object() { return coro_init_handler{this}; }
|
66
|
-
|
67
|
-
cancellation_slot cancel_slot;
|
68
|
-
};
|
52
|
+
return initiate_impl(std::move(initiation), std::allocator_arg,
|
53
|
+
tk.get_allocator(), std::forward<InitArgs>(args)...);
|
54
|
+
}
|
55
|
+
};
|
69
56
|
|
70
|
-
|
57
|
+
template <typename Allocator, typename R>
|
58
|
+
struct async_result<
|
59
|
+
experimental::use_coro_t<Allocator>, R(boost::system::error_code)>
|
60
|
+
{
|
61
|
+
template <typename Initiation, typename... InitArgs>
|
62
|
+
static auto initiate_impl(Initiation initiation,
|
63
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
64
|
+
-> experimental::coro<void() noexcept, void,
|
65
|
+
boost::asio::associated_executor_t<Initiation>, Allocator>
|
71
66
|
{
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
constexpr static void await_suspend(coroutine_handle<>) noexcept {}
|
77
|
-
|
78
|
-
auto await_resume() const noexcept
|
79
|
-
{
|
80
|
-
assert(self_);
|
81
|
-
return bind_cancellation_slot(self_->cancel_slot,
|
82
|
-
bind_executor(*self_->executor, [self = self_](Ts... ts)
|
83
|
-
{
|
84
|
-
self->cancel_slot.clear();
|
85
|
-
self->result.emplace(std::move(ts)...);
|
86
|
-
self->h.resume();
|
87
|
-
}));
|
88
|
-
}
|
89
|
-
};
|
67
|
+
co_await deferred_async_operation<
|
68
|
+
R(boost::system::error_code), Initiation, InitArgs...>(
|
69
|
+
deferred_init_tag{}, std::move(initiation), std::move(args)...);
|
70
|
+
}
|
90
71
|
|
91
|
-
|
72
|
+
template <typename... InitArgs>
|
73
|
+
static auto initiate_impl(
|
74
|
+
boost::asio::detail::initiation_archetype<R(boost::system::error_code)>,
|
75
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
76
|
+
-> experimental::coro<void(), void,
|
77
|
+
boost::asio::any_io_executor, Allocator>;
|
92
78
|
|
93
|
-
|
79
|
+
template <typename Initiation, typename... InitArgs>
|
80
|
+
static auto initiate(Initiation initiation,
|
81
|
+
experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
|
94
82
|
{
|
95
|
-
|
83
|
+
return initiate_impl(std::move(initiation), std::allocator_arg,
|
84
|
+
tk.get_allocator(), std::forward<InitArgs>(args)...);
|
96
85
|
}
|
86
|
+
};
|
97
87
|
|
98
|
-
|
88
|
+
template <typename Allocator, typename R>
|
89
|
+
struct async_result<
|
90
|
+
experimental::use_coro_t<Allocator>, R(std::exception_ptr)>
|
91
|
+
{
|
92
|
+
template <typename Initiation, typename... InitArgs>
|
93
|
+
static auto initiate_impl(Initiation initiation,
|
94
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
95
|
+
-> experimental::coro<void(), void,
|
96
|
+
boost::asio::associated_executor_t<Initiation>, Allocator>
|
99
97
|
{
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
template <typename Yield, typename Return,
|
105
|
-
convertible_to<Executor> Executor1>
|
106
|
-
auto await_suspend(
|
107
|
-
coroutine_handle<coro_promise<Yield, Return, Executor1> > h) noexcept
|
108
|
-
{
|
109
|
-
promise->executor = h.promise().get_executor();
|
110
|
-
promise->h = h;
|
111
|
-
return coroutine_handle<promise_type>::from_promise(*promise);
|
112
|
-
}
|
113
|
-
|
114
|
-
template <typename... Args>
|
115
|
-
static auto resume_impl(std::tuple<Args...>&& tup)
|
116
|
-
{
|
117
|
-
return std::move(tup);
|
118
|
-
}
|
119
|
-
|
120
|
-
template <typename Arg>
|
121
|
-
static auto resume_impl(std::tuple<Arg>&& tup)
|
122
|
-
{
|
123
|
-
return get<0>(std::move(tup));
|
124
|
-
}
|
125
|
-
|
126
|
-
static void resume_impl(std::tuple<>&&) {}
|
98
|
+
co_await deferred_async_operation<
|
99
|
+
R(boost::system::error_code), Initiation, InitArgs...>(
|
100
|
+
deferred_init_tag{}, std::move(initiation), std::move(args)...);
|
101
|
+
}
|
127
102
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
};
|
103
|
+
template <typename... InitArgs>
|
104
|
+
static auto initiate_impl(
|
105
|
+
boost::asio::detail::initiation_archetype<R(std::exception_ptr)>,
|
106
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
107
|
+
-> experimental::coro<void(), void,
|
108
|
+
boost::asio::any_io_executor, Allocator>;
|
135
109
|
|
136
|
-
|
110
|
+
template <typename Initiation, typename... InitArgs>
|
111
|
+
static auto initiate(Initiation initiation,
|
112
|
+
experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
|
137
113
|
{
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
template <typename Yield, typename Return,
|
143
|
-
convertible_to<Executor> Executor1>
|
144
|
-
auto await_suspend(
|
145
|
-
coroutine_handle<coro_promise<Yield, Return, Executor1> > h) noexcept
|
146
|
-
{
|
147
|
-
promise->executor = h.promise().get_executor();
|
148
|
-
promise->h = h;
|
149
|
-
return coroutine_handle<promise_type>::from_promise(*promise);
|
150
|
-
}
|
151
|
-
|
152
|
-
template <typename... Args>
|
153
|
-
static auto resume_impl(std::tuple<Args...>&& tup)
|
154
|
-
{
|
155
|
-
return std::move(tup);
|
156
|
-
}
|
157
|
-
|
158
|
-
static void resume_impl(std::tuple<>&&) {}
|
159
|
-
|
160
|
-
template <typename Arg>
|
161
|
-
static auto resume_impl(std::tuple<Arg>&& tup)
|
162
|
-
{
|
163
|
-
return get<0>(std::move(tup));
|
164
|
-
}
|
165
|
-
|
166
|
-
template <typename... Args>
|
167
|
-
static auto resume_impl(std::tuple<std::exception_ptr, Args...>&& tup)
|
168
|
-
{
|
169
|
-
auto ex = get<0>(std::move(tup));
|
170
|
-
if (ex)
|
171
|
-
std::rethrow_exception(ex);
|
172
|
-
|
173
|
-
if constexpr (sizeof...(Args) == 0u)
|
174
|
-
return;
|
175
|
-
else if constexpr (sizeof...(Args) == 1u)
|
176
|
-
return get<1>(std::move(tup));
|
177
|
-
else
|
178
|
-
{
|
179
|
-
return
|
180
|
-
[&]<std::size_t... Idx>(std::index_sequence<Idx...>)
|
181
|
-
{
|
182
|
-
return std::make_tuple(std::get<Idx + 1>(std::move(tup))...);
|
183
|
-
}(std::make_index_sequence<sizeof...(Args) - 1>{});
|
184
|
-
}
|
185
|
-
}
|
186
|
-
|
187
|
-
template <typename... Args>
|
188
|
-
static auto resume_impl(
|
189
|
-
std::tuple<boost::system::error_code, Args...>&& tup)
|
190
|
-
{
|
191
|
-
auto ec = get<0>(std::move(tup));
|
192
|
-
if (ec)
|
193
|
-
boost::asio::detail::throw_exception(
|
194
|
-
boost::system::system_error(ec, "error_code in use_coro"));
|
195
|
-
|
196
|
-
if constexpr (sizeof...(Args) == 0u)
|
197
|
-
return;
|
198
|
-
else if constexpr (sizeof...(Args) == 1u)
|
199
|
-
return get<1>(std::move(tup));
|
200
|
-
else
|
201
|
-
return
|
202
|
-
[&]<std::size_t... Idx>(std::index_sequence<Idx...>)
|
203
|
-
{
|
204
|
-
return std::make_tuple(std::get<Idx + 1>(std::move(tup))...);
|
205
|
-
}(std::make_index_sequence<sizeof...(Args) - 1>{});
|
206
|
-
}
|
114
|
+
return initiate_impl(std::move(initiation), std::allocator_arg,
|
115
|
+
tk.get_allocator(), std::forward<InitArgs>(args)...);
|
116
|
+
}
|
117
|
+
};
|
207
118
|
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
if (ex)
|
212
|
-
std::rethrow_exception(ex);
|
213
|
-
}
|
119
|
+
template <typename Allocator, typename R, typename T>
|
120
|
+
struct async_result<experimental::use_coro_t<Allocator>, R(T)>
|
121
|
+
{
|
214
122
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
123
|
+
template <typename Initiation, typename... InitArgs>
|
124
|
+
static auto initiate_impl(Initiation initiation,
|
125
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
126
|
+
-> experimental::coro<void() noexcept, T,
|
127
|
+
boost::asio::associated_executor_t<Initiation>, Allocator>
|
128
|
+
{
|
129
|
+
co_return co_await deferred_async_operation<R(), Initiation, InitArgs...>(
|
130
|
+
deferred_init_tag{}, std::move(initiation), std::move(args)...);
|
131
|
+
}
|
222
132
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
}
|
229
|
-
};
|
133
|
+
template <typename... InitArgs>
|
134
|
+
static auto initiate_impl(boost::asio::detail::initiation_archetype<R(T)>,
|
135
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
136
|
+
-> experimental::coro<void() noexcept, T,
|
137
|
+
boost::asio::any_io_executor, Allocator>;
|
230
138
|
|
231
|
-
|
139
|
+
template <typename Initiation, typename... InitArgs>
|
140
|
+
static auto initiate(Initiation initiation,
|
141
|
+
experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
|
232
142
|
{
|
233
|
-
|
234
|
-
|
143
|
+
return initiate_impl(std::move(initiation), std::allocator_arg,
|
144
|
+
tk.get_allocator(), std::forward<InitArgs>(args)...);
|
235
145
|
}
|
146
|
+
};
|
236
147
|
|
237
|
-
|
148
|
+
template <typename Allocator, typename R, typename T>
|
149
|
+
struct async_result<
|
150
|
+
experimental::use_coro_t<Allocator>, R(boost::system::error_code, T)>
|
151
|
+
{
|
152
|
+
template <typename Initiation, typename... InitArgs>
|
153
|
+
static auto initiate_impl(Initiation initiation,
|
154
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
155
|
+
-> experimental::coro<void(), T,
|
156
|
+
boost::asio::associated_executor_t<Initiation>, Allocator>
|
238
157
|
{
|
239
|
-
|
240
|
-
|
158
|
+
co_return co_await deferred_async_operation<
|
159
|
+
R(boost::system::error_code), Initiation, InitArgs...>(
|
160
|
+
deferred_init_tag{}, std::move(initiation), std::move(args)...);
|
241
161
|
}
|
242
|
-
};
|
243
162
|
|
244
|
-
|
245
|
-
|
163
|
+
template <typename... InitArgs>
|
164
|
+
static auto initiate_impl(
|
165
|
+
boost::asio::detail::initiation_archetype<
|
166
|
+
R(boost::system::error_code, T)>,
|
167
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
168
|
+
-> experimental::coro<void(), T, boost::asio::any_io_executor, Allocator>;
|
246
169
|
|
247
|
-
|
170
|
+
template <typename Initiation, typename... InitArgs>
|
171
|
+
static auto initiate(Initiation initiation,
|
172
|
+
experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
|
173
|
+
{
|
174
|
+
return initiate_impl(std::move(initiation), std::allocator_arg,
|
175
|
+
tk.get_allocator(), std::forward<InitArgs>(args)...);
|
176
|
+
}
|
177
|
+
};
|
248
178
|
|
249
|
-
template <typename
|
250
|
-
struct async_result<
|
179
|
+
template <typename Allocator, typename R, typename T>
|
180
|
+
struct async_result<
|
181
|
+
experimental::use_coro_t<Allocator>, R(std::exception_ptr, T)>
|
251
182
|
{
|
252
|
-
|
253
|
-
|
183
|
+
template <typename Initiation, typename... InitArgs>
|
184
|
+
static auto initiate_impl(Initiation initiation,
|
185
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
186
|
+
-> experimental::coro<void(), T,
|
187
|
+
boost::asio::associated_executor_t<Initiation>, Allocator>
|
188
|
+
{
|
189
|
+
co_return co_await deferred_async_operation<
|
190
|
+
R(boost::system::error_code), Initiation, InitArgs...>(
|
191
|
+
deferred_init_tag{}, std::move(initiation), std::move(args)...);
|
192
|
+
}
|
193
|
+
|
194
|
+
template <typename... InitArgs>
|
195
|
+
static auto initiate_impl(
|
196
|
+
boost::asio::detail::initiation_archetype<R(std::exception_ptr, T)>,
|
197
|
+
std::allocator_arg_t, Allocator, InitArgs... args)
|
198
|
+
-> experimental::coro<void(), T, boost::asio::any_io_executor, Allocator>;
|
254
199
|
|
255
200
|
template <typename Initiation, typename... InitArgs>
|
256
|
-
static
|
257
|
-
experimental::use_coro_t<
|
201
|
+
static auto initiate(Initiation initiation,
|
202
|
+
experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
|
258
203
|
{
|
259
|
-
std::move(initiation)
|
204
|
+
return initiate_impl(std::move(initiation), std::allocator_arg,
|
205
|
+
tk.get_allocator(), std::forward<InitArgs>(args)...);
|
260
206
|
}
|
261
207
|
};
|
262
208
|
|
@@ -0,0 +1,68 @@
|
|
1
|
+
//
|
2
|
+
// experimental/impl/use_promise.hpp
|
3
|
+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
4
|
+
//
|
5
|
+
// Copyright (c) 2021-2022 Klemens D. Morgenstern
|
6
|
+
// (klemens dot morgenstern at gmx dot net)
|
7
|
+
//
|
8
|
+
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
9
|
+
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
10
|
+
//
|
11
|
+
|
12
|
+
#ifndef BOOST_ASIO_EXPERIMENTAL_IMPL_USE_PROMISE_HPP
|
13
|
+
#define BOOST_ASIO_EXPERIMENTAL_IMPL_USE_PROMISE_HPP
|
14
|
+
|
15
|
+
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
16
|
+
# pragma once
|
17
|
+
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
|
18
|
+
|
19
|
+
#include <boost/asio/detail/config.hpp>
|
20
|
+
#include <memory>
|
21
|
+
#include <boost/asio/async_result.hpp>
|
22
|
+
|
23
|
+
#include <boost/asio/detail/push_options.hpp>
|
24
|
+
|
25
|
+
namespace boost {
|
26
|
+
namespace asio {
|
27
|
+
namespace experimental {
|
28
|
+
|
29
|
+
template <typename Allocator>
|
30
|
+
struct use_promise_t;
|
31
|
+
|
32
|
+
namespace detail {
|
33
|
+
|
34
|
+
template<typename Signature, typename Executor, typename Allocator>
|
35
|
+
struct promise_handler;
|
36
|
+
|
37
|
+
} // namespace detail
|
38
|
+
} // namespace experimental
|
39
|
+
|
40
|
+
#if !defined(GENERATING_DOCUMENTATION)
|
41
|
+
|
42
|
+
template <typename Allocator, typename R, typename... Args>
|
43
|
+
struct async_result<experimental::use_promise_t<Allocator>, R(Args...)>
|
44
|
+
{
|
45
|
+
template <typename Initiation, typename... InitArgs>
|
46
|
+
static auto initiate(Initiation initiation,
|
47
|
+
experimental::use_promise_t<Allocator> up, InitArgs... args)
|
48
|
+
-> experimental::promise<void(typename decay<Args>::type...),
|
49
|
+
boost::asio::associated_executor_t<Initiation>, Allocator>
|
50
|
+
{
|
51
|
+
using handler_type = experimental::detail::promise_handler<
|
52
|
+
void(typename decay<Args>::type...),
|
53
|
+
boost::asio::associated_executor_t<Initiation>, Allocator>;
|
54
|
+
|
55
|
+
handler_type ht{up.get_allocator(), get_associated_executor(initiation)};
|
56
|
+
std::move(initiation)(ht, std::move(args)...);
|
57
|
+
return ht.make_promise();
|
58
|
+
}
|
59
|
+
};
|
60
|
+
|
61
|
+
#endif // !defined(GENERATING_DOCUMENTATION)
|
62
|
+
|
63
|
+
} // namespace asio
|
64
|
+
} // namespace boost
|
65
|
+
|
66
|
+
#include <boost/asio/detail/pop_options.hpp>
|
67
|
+
|
68
|
+
#endif // BOOST_ASIO_EXPERIMENTAL_IMPL_USE_PROMISE_HPP
|