2
0
mirror of https://github.com/boostorg/asio.git synced 2026-02-23 14:02:13 +00:00
Commit Graph

1261 Commits

Author SHA1 Message Date
Christopher Kohlhoff
bb05560d61 Disable non-virtual destructor warning on MSVC. 2021-10-17 11:04:17 +11:00
Christopher Kohlhoff
a8b564de46 Fix the initialisation order of members.
Reorder the constructor list in `win_iocp_socket_accept_op`, so that
`proxy_op` comes before `cancel_requested`, matching the order in which
these members are declared.

This addresses a warning that members are constructed out-of-order.
2021-10-17 11:03:58 +11:00
Christopher Kohlhoff
38e4883c21 Fix typo in io_context documentation (overlaod -> overload). 2021-10-17 11:03:31 +11:00
Christopher Kohlhoff
e2c30f4455 Fix compilation on Solaris. 2021-10-17 11:02:55 +11:00
Christopher Kohlhoff
138ff6f68f Fix defence against macros defined by Qt on MSVC. 2021-10-17 11:02:39 +11:00
Christopher Kohlhoff
290ccf5a73 Use declval in is_legacy_connect_condition check.
gcc 11.2 at -O3 rejects:

error: 'this' pointer is null [-Werror=nonnull]
   77 |         (*static_cast<legacy_connect_condition_helper<T, Iterator>*>(0))(
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   78 |           *static_cast<const asio::error_code*>(0),
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   79 |           *static_cast<const Iterator*>(0)))) != 1;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-10-17 11:01:58 +11:00
Christopher Kohlhoff
a6f695ae55 More doc fixes for per-operation cancellation. 2021-08-05 11:23:31 +10:00
Christopher Kohlhoff
51583924ba Revert accidental code change in b12ae3da40. 2021-08-05 10:53:29 +10:00
Christopher Kohlhoff
b12ae3da40 Document per-operation cancellation for coroutines. 2021-08-05 10:31:54 +10:00
Christopher Kohlhoff
87f74576b9 Version bump. 2021-08-04 22:18:50 +10:00
Christopher Kohlhoff
d38deaa771 Add documentation for parallel_group. 2021-08-04 22:15:51 +10:00
Klemens
9369dbb269 Gcc fixes for promise & coro. 2021-08-03 17:56:56 +10:00
Christopher Kohlhoff
b0c59119b7 Ensure parallel_group respects operations' associated executors. 2021-08-01 18:30:53 +10:00
Christopher Kohlhoff
eda851faa9 Fix typo. 2021-08-01 18:26:49 +10:00
Christopher Kohlhoff
2c20ef0da1 Add missing move of executor. 2021-07-31 19:29:02 +10:00
Christopher Kohlhoff
0938b4e425 Fix posix::basic_stream_descriptor move operations.
They were only working when using the default executor.
2021-07-31 19:28:50 +10:00
Christopher Kohlhoff
1580a27777 Fix handler type requirements checking to reflect rvalue completion handler invocation. 2021-07-20 17:44:15 +10:00
Christopher Kohlhoff
318fee3a20 Fix compilation errors when dev_poll_reactor backend is used. 2021-07-20 17:43:27 +10:00
Christopher Kohlhoff
0ed8cce777 Enable 'expression SFINAE' for recent MSVC using /std:c++latest. 2021-07-20 17:43:11 +10:00
Christopher Kohlhoff
23246bec20 Use c++20 / coroutines with gcc10 build. 2021-07-17 12:59:04 +10:00
Christopher Kohlhoff
20ff7b2c1a Clean up memory recycling to ensure the cache size is used consistently. 2021-07-17 12:58:45 +10:00
Christopher Kohlhoff
2bfe4e9bf4 Fix argument evaluation order issue with a potentially moved-from variable. 2021-07-15 12:04:47 +10:00
Christopher Kohlhoff
31b21a0347 Add missing push/pop_options includes. 2021-07-15 12:04:39 +10:00
Christopher Kohlhoff
dc65ef1bfd Add tag to disambiguate deferred constructors. 2021-07-15 12:04:27 +10:00
Christopher Kohlhoff
9ee3a1673e Add missing lvalue-qualified overloads for operator(). 2021-07-15 12:04:16 +10:00
Christopher Kohlhoff
d70f7e4440 Add missing 'boost_' prefix to namespaces during boostification. 2021-07-15 12:04:02 +10:00
Christopher Kohlhoff
ada04ca76f Defend against macros defined by Qt. 2021-07-15 12:03:40 +10:00
Christopher Kohlhoff
e7f8e5eea5 Make awaitable_tag memory recycling use the configurable cache size. 2021-07-15 12:03:29 +10:00
Christopher Kohlhoff
f6d3a8c2ef Version bump. 2021-07-15 12:03:16 +10:00
Christopher Kohlhoff
a51b9b8198 Ensure un-cancelled ops are correctly placed back in the queue. 2021-07-11 22:03:29 +10:00
Christopher Kohlhoff
aafa4c6471 Document supported cancellation types. 2021-07-11 19:12:44 +10:00
Christopher Kohlhoff
2f207559f0 Fix compatibility with recent LibreSSL when OPENSSL_NO_SSL_INTERN is defined. 2021-07-11 16:45:55 +10:00
Christopher Kohlhoff
455729198e Disable coroutines support for the clang shipped with MSVC. 2021-07-11 16:45:42 +10:00
Christopher Kohlhoff
eb33daf680 Ensure gcc tests are not used for clang when detecting compiler/language features. 2021-07-11 16:45:12 +10:00
Christopher Kohlhoff
649dde15c9 Ensure handler alignment requirements are respected by cancellation_signal. 2021-07-11 10:20:19 +10:00
Christopher Kohlhoff
310dcb34b2 Fix order of _aligned_malloc arguments for MSVC. 2021-07-11 10:20:19 +10:00
Christopher Kohlhoff
99ebe28a64 Fix strand<> to avoid using a potentially moved-from executor. 2021-07-11 10:20:19 +10:00
Christopher Kohlhoff
c1fd78e785 Fix handling of move-only results with awaitable operators && and ||. 2021-07-11 10:20:19 +10:00
Christopher Kohlhoff
ef4e3d873c Add missing #includes for when using separate compilation. 2021-07-08 13:14:30 +10:00
Christopher Kohlhoff
c47d0007c5 Exclude is_deferred trait specialisations from the docs. 2021-07-08 00:50:38 +10:00
Christopher Kohlhoff
8f6bdef9e5 Version bump. 2021-07-07 22:47:51 +10:00
Christopher Kohlhoff
1570d3c352 Clean up source code for doxygen generation. 2021-07-07 20:21:14 +10:00
Christopher Kohlhoff
837f789484 Apply cancellation to a restarted AcceptEx operation. 2021-07-07 17:34:41 +10:00
Christopher Kohlhoff
87b84d2d1b Add cancellation slot support to IOCP sockets when using reactor-based operations. 2021-07-06 00:45:22 +10:00
Christopher Kohlhoff
77cf53057c Fix return_void() in experimental::coro. 2021-07-04 13:10:27 +10:00
Christopher Kohlhoff
1961a5ca2a Fix execution_context concept definition. 2021-07-04 13:10:27 +10:00
Christopher Kohlhoff
9134e26afe Remove unused lambda capture. 2021-07-04 13:10:27 +10:00
Christopher Kohlhoff
769dc0e149 Add this_coro::throw_if_cancelled.
By default, awaitable<>-based coroutines now throw an exception if they
have been previously cancelled, and then try to perform a co_await
against another awaitable<>.

To disable this behaviour for the current awaitable<>-based "thread",
perform:

    co_await boost::asio::this_coro::throw_if_error(false);

It is then the responsibility of the coroutine implementation to ensure
that it checks the cancellation state of the coroutine manually, by
doing something like:

    auto cs = boost::asio::this_coro::cancellation_state;
    // ...
    if (cs.cancelled() != cancellation_type::none)
    {
      // ... handle cancellation ...
    }
2021-07-04 13:10:27 +10:00
Christopher Kohlhoff
e711511742 Fixes for experimental::coro when using gcc 11. 2021-07-04 13:10:27 +10:00
Christopher Kohlhoff
8c56568e3b Store awaitable_thread state in the bottom-of-stack promise. 2021-07-04 13:10:27 +10:00