13 Commits

Author SHA1 Message Date
Christopher Kohlhoff
1afbc5c12b Update copyright notices. 2025-03-04 22:57:26 +11:00
Christopher Kohlhoff
7e5ab33105 Fix spelling errors. 2024-12-03 08:39:39 +11:00
Christopher Kohlhoff
6df0537864 Update operations/composed_6 exaple to also free delay_timer_.
Also the delay_timer_ member should be freed before calling the
user-supplied completion handler (as in the composed_7 and composed_8
examples).
2024-07-08 23:24:05 +10:00
Christopher Kohlhoff
c36d3ef338 Update copyright notices. 2024-03-05 07:51:17 +11:00
Christopher Kohlhoff
35e93e4e90 Update copyright notices. 2023-03-01 23:03:03 +11:00
Christopher Kohlhoff
e857ceba97 Ensure all operations examples use the new async_result form. 2022-07-05 20:25:09 +10:00
Christopher Kohlhoff
5898a5279c Add C++14 examples of wrapping callback-based APIs. 2022-03-07 23:32:16 +11:00
Christopher Kohlhoff
64faf0a6d2 Enable executor_work_guard<> even when ASIO_NO_TS_EXECUTORS is defined. 2022-03-02 21:57:42 +11:00
Christopher Kohlhoff
ff58013a23 Update copyright notices. 2022-03-02 21:23:52 +11:00
Christopher Kohlhoff
723982b867 Update copyright notices. 2021-02-25 08:29:05 +11:00
Christopher Kohlhoff
fefe9a992e Use properties to track outstanding work against an io_context.
When using standard executors, work is tracked by requiring (or
preferring) an executor with the execution::outstanding_work.tracked
property. This replaces executor_work_guard and make_work_guard() with
code of the form

    asio::io_context io_context;
    auto work = asio::require(io_context.get_executor(),
        asio::execution::outstanding_work.tracked);

To explicitly reset work, store the returned work-tracking executor in
an any_io_executor object:

    asio::any_io_executor work
      = asio::require(io_context.get_executor(),
          asio::execution::outstanding_work.tracked);

and then assign an empty executor into the object when done:

    work = asio::any_io_executor();
2020-06-23 11:08:25 +10:00
Christopher Kohlhoff
4b552cfd5b Update copyright notices. 2020-04-07 11:15:42 +10:00
Christopher Kohlhoff
2f7af2e33c Update composed operations examples to use async_initiate and a new helper function async_compose. 2019-03-06 20:22:23 +11:00