Christopher Kohlhoff
ed722fb0a3
Add consign completion token adapter.
...
The consign completion token adapter can be used to attach additional
values to a completion handler. This is typically used to keep at least
one copy of an object, such as a smart pointer, alive until the
completion handler is called.
For example:
auto timer1 = std::make_shared<boost::asio::steady_timer>(my_io_context);
timer1->expires_after(std::chrono::seconds(1));
timer1->async_wait(
boost::asio::consign(
[](boost::system::error_code ec)
{
// ...
},
timer1
)
);
auto timer2 = std::make_shared<boost::asio::steady_timer>(my_io_context);
timer2->expires_after(std::chrono::seconds(30));
std::future<void> f =
timer2->async_wait(
boost::asio::consign(
boost::asio::use_future,
timer2
)
);
2022-11-01 11:00:15 +11:00
..
2022-03-02 21:23:52 +11:00
2022-11-01 11:00:15 +11:00
2022-06-30 13:41:25 +10:00
2022-07-05 20:41:39 +10:00
2022-07-05 20:41:39 +10:00
2022-03-02 21:23:52 +11:00
2022-07-05 20:41:39 +10:00
2022-07-05 20:41:39 +10:00
2022-03-02 21:23:52 +11:00
2022-07-05 20:41:39 +10:00
2022-03-02 21:23:52 +11:00
2022-07-05 20:41:39 +10:00
2022-06-30 00:43:16 +10:00
2022-06-30 00:43:16 +10:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:57:41 +11:00
2022-03-02 21:57:42 +11:00
2022-03-02 21:57:42 +11:00
2022-03-02 21:23:52 +11:00
2022-06-30 01:08:13 +10:00
2022-07-05 20:41:39 +10:00
2022-07-05 20:41:39 +10:00
2022-07-05 20:41:39 +10:00
2022-07-05 20:41:39 +10:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-07-05 20:41:39 +10:00
2022-03-02 21:23:52 +11:00
2022-11-01 11:00:15 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-06-30 01:08:13 +10:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-11-01 10:44:37 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-11-01 11:00:15 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-06-30 00:43:16 +10:00
2022-06-30 12:17:16 +10:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-07-05 20:41:39 +10:00
2022-03-04 20:56:45 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-07-05 20:41:39 +10:00
2022-07-05 20:41:39 +10:00
2022-07-05 20:41:39 +10:00
2022-07-05 20:41:39 +10:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-11-01 10:44:37 +11:00
2022-06-30 12:17:16 +10:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-11-01 11:00:15 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-11-01 11:00:15 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00
2022-07-05 20:41:39 +10:00
2022-03-02 21:23:52 +11:00
2022-03-02 21:23:52 +11:00