2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-28 18:52:09 +00:00
Commit Graph

1441 Commits

Author SHA1 Message Date
Christopher Kohlhoff
07f71caef2 Remove unnecessary specialisation of associated_cancellation_slot. 2022-11-01 09:30:28 +11:00
Christopher Kohlhoff
8be3d47f24 Add associated_cancellation_slot specialisation for std::reference_wrapper. 2022-11-01 09:30:18 +11:00
Christopher Kohlhoff
217986acc7 Use null pointers to implement empty execution::any_executor.
Improves performance of copy/move operations on empty executors.
2022-11-01 09:30:02 +11:00
Christopher Kohlhoff
8dd81fce89 Add nothrow constructor overloads to any_io_executor. 2022-11-01 09:29:46 +11:00
Christopher Kohlhoff
22f4d42fd6 Add nothrow constructor overloads to execution::any_executor<>. 2022-11-01 09:29:19 +11:00
Christopher Kohlhoff
49d11205b1 Add missing context query to use_future's executor. 2022-11-01 09:28:58 +11:00
Christopher Kohlhoff
0af7858e7b Version bump. 2022-08-04 00:11:08 +10:00
Christopher Kohlhoff
d9f5562ba7 Recreate the select_reactor's interrupter on a user-supplied thread, when using IOCP on Windows. 2022-08-03 14:10:10 +10:00
Christopher Kohlhoff
83880a798d Store reference to basic_yield_context in handler.
Improves performance by not copying the executor into the handler.
2022-08-01 09:09:30 +10:00
Christopher Kohlhoff
914c367395 Destroy spawned thread immediately if it completes within handler invocation. 2022-08-01 09:09:30 +10:00
Christopher Kohlhoff
c417121b1e Defend against Qt macros when using Intel C++. 2022-08-01 09:09:30 +10:00
Christopher Kohlhoff
ab543a1383 Remove faulty assertions from experimental::coro implementation. 2022-08-01 09:09:27 +10:00
Christopher Kohlhoff
c8fd215be3 Fix detection of aligned_alloc for Apple platforms. 2022-08-01 09:02:55 +10:00
Christopher Kohlhoff
fc901432c1 Change async_compose example to use return type compatible with new async_result form. 2022-08-01 09:02:35 +10:00
Christopher Kohlhoff
ce29925259 Avoid copying async operation object in await_transform. 2022-08-01 09:00:28 +10:00
Christopher Kohlhoff
9882b2ab11 Disable index_sequence emulation when variadic templates are unavailable. 2022-08-01 08:59:54 +10:00
Christopher Kohlhoff
ccc065c3f1 Fix usage of macro to detect std::exception_ptr. 2022-07-07 11:52:13 +10:00
Christopher Kohlhoff
56eaf73f92 Use deferred rather than use_awaitable in awaitable_operators implementation. 2022-07-07 00:27:15 +10:00
Christopher Kohlhoff
a3b5bfe85e Version bump. 2022-07-06 20:44:09 +10:00
Christopher Kohlhoff
ad5d852009 Fix compatibility with older compilers. 2022-07-06 19:41:20 +10:00
Christopher Kohlhoff
8948cfe348 Use local implementation of soon-to-be-deprecated std::aligned_storage. 2022-07-06 19:40:02 +10:00
Christopher Kohlhoff
d1f577e44a Require at least gcc 7.4 to enable aligned_alloc. 2022-07-05 20:53:31 +10:00
Christopher Kohlhoff
54b7d7f585 Use void* for socket address to match documented Endpoint requirements. 2022-07-05 20:41:28 +10:00
Christopher Kohlhoff
9e75820ee0 Add missing release() member functions to windows overlapped handles. 2022-07-05 20:27:16 +10:00
Christopher Kohlhoff
0733511a4c Add missing release() member functions to pipes. 2022-07-05 20:27:06 +10:00
Christopher Kohlhoff
cef3561699 Add missing throw-if-cancelled check when awaiting an async op directly. 2022-07-05 20:26:52 +10:00
Christopher Kohlhoff
2e10c1950a Fix -Wmaybe-uninitialized warnings. 2022-07-05 20:26:35 +10:00
Christopher Kohlhoff
eb8c4f0dab Propagate exceptions from awaited initiation functions through the resuming handler. 2022-07-05 20:26:24 +10:00
Christopher Kohlhoff
a528f972f4 Specifically exclude forced_unwind exceptions from catch-all. 2022-07-05 20:26:10 +10:00
Christopher Kohlhoff
1fcf107b8a Obtain associated allocator before handler is moved.
Fixes a sequencing issue in the implementation of post(), dispatch(),
and defer(), where the the associated allocator may be obtained from an
already moved-from completion handler.
2022-07-05 20:24:38 +10:00
Christopher Kohlhoff
a291cca82a Fix missing include. 2022-07-05 20:24:24 +10:00
Christopher Kohlhoff
46f49024e1 Removed all & race from promise - parallel_group covers most of it now. 2022-06-30 13:41:25 +10:00
Christopher Kohlhoff
fc5ed8c610 Fix issue where parallel_group initiation incorrectly moved arguments instead of forwarding them. 2022-06-30 13:40:59 +10:00
Christopher Kohlhoff
1e7a58f5fc Fix detection of invoke_result for clang/libc++. 2022-06-30 13:40:39 +10:00
Christopher Kohlhoff
8622bcdac0 Fix error location for windows overlapped and handle operations. 2022-06-30 12:47:37 +10:00
Christopher Kohlhoff
2eda791fcd Add converting move construction/assignment to pipes. 2022-06-30 12:17:54 +10:00
Christopher Kohlhoff
4ef2cd0054 Add converting move construction/assignment to serial ports. 2022-06-30 12:17:39 +10:00
Christopher Kohlhoff
de2d299455 Add converting move construction/assignment to Windows stream and random-access handles. 2022-06-30 12:17:04 +10:00
Christopher Kohlhoff
5ce5e7e8ff Add converting move construction/assignment to Windows object_handle. 2022-06-30 12:16:44 +10:00
Christopher Kohlhoff
15e9e956b7 Add converting move construction/assignment to posix descriptors. 2022-06-30 12:16:25 +10:00
Christopher Kohlhoff
d4ad331588 Optimise move construction of I/O objects where only the executor type differs. 2022-06-30 12:16:04 +10:00
Christopher Kohlhoff
088c112908 Code formatting. 2022-06-30 12:15:48 +10:00
Christopher Kohlhoff
23f0cdd50c Fix there is no warning number 'XXXX' in windows.
In newer versions of MSVC a number of warning numbers which are disabled
in this header are removed so builds using boost asio gets spammed with
"there is no warning number 'XXXX'".
2022-06-30 12:15:19 +10:00
Christopher Kohlhoff
d09c389558 Explicitly state that shutdown(what) calls are thread-safe. 2022-06-30 12:15:08 +10:00
Christopher Kohlhoff
202a0689e8 Make gcc_x86_fenced_block compatible with -masm=intel. 2022-06-30 12:14:57 +10:00
Christopher Kohlhoff
723eee7a40 Regenerate documentation. 2022-06-30 01:18:45 +10:00
Christopher Kohlhoff
5bbdc9b709 Change spawn() to be a completion token-based async operation.
Added new spawn() overloads that conform to the requirements for
asynchronous operations. These overloads also support cancellation. When
targeting C++11 and later these functions are implemented in terms of
Boost.Context directly.

The existing overloads have been retained but are deprecated.
2022-06-30 01:18:45 +10:00
Christopher Kohlhoff
74a94fe7f4 Fix compatibility with OpenSSL 3.0.4 and later. 2022-06-30 01:08:13 +10:00
Christopher Kohlhoff
aecb458f53 Allow awaitable<>-based coroutines to directly co_await operations.
Coroutines that use awaitable<> can now co_await asynchronous operations
that are packaged as function objects. For example:

  asio::awaitable<void> my_coro()
  {
    asio::steady_timer timer(co_await asio::this_coro::executor);
    timer.expires_after(std::chrono::seconds(5));

    co_await timer.async_wait(asio::deferred);
  }

or:

  asio::awaitable<void> my_coro()
  {
    asio::steady_timer timer(co_await asio::this_coro::executor);
    timer.expires_after(std::chrono::seconds(5));

    co_await [&](auto&& token)
    {
      return timer.async_wait(std::forward<decltype(token)>(token));
    };
  }
2022-06-30 01:08:13 +10:00
Christopher Kohlhoff
642f463a8d Use completion_signature_of in implementation of experimental::parallel_group. 2022-06-30 01:08:13 +10:00