Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions include/boost/capy/timeout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,12 @@ class timeout_launcher
complete wins and cancels the other. If the awaitable finishes
first, its result is returned as-is (success, error, or
exception). If the timer fires first, an `io_result` with
`ec == error::timeout` is produced.
`ec == error::timeout` is produced. The timeout fires at or
after the specified duration.

Unlike @ref when_any, exceptions from the inner awaitable
are always propagated — they are never swallowed by the timer.

@par Return Type

Always returns `io_result<Ts...>` matching the inner
awaitable's result type. On timeout, `ec` is set to
`error::timeout` and payload values are default-initialized.

@par Precision

The timeout fires at or after the specified duration.

@par Cancellation

If the parent's stop token is activated, both children are
Expand All @@ -192,9 +183,14 @@ class timeout_launcher
@param a The awaitable to race against the deadline.
@param dur The maximum duration to wait.

@return `task<awaitable_result_t<A>>`.
@return An `io_result<Ts...>` matching the inner awaitable's
result type. On normal completion the inner awaitable's
result is returned unchanged, whether it indicates success
or sets `ec` to an error. On timeout, `ec` is set to
`error::timeout` and the payload values are
default-initialized.

@throws Rethrows any exception from the inner awaitable,
@throws Rethrows Any exception from the inner awaitable,
regardless of whether the timer has fired.

@see delay, cond::timeout
Expand Down
Loading