std::execution::sync_wait - cppreference.com
Namespaces
Variants

std::execution::sync_wait

From cppreference.com
 
 
 
Defined in header <execution>
auto sync_wait( execution::sender auto sender )
    requires (/*always-sends-some-values*/(sender))
        -> std::optional<std::tuple</*value-sent-by*/(sender)>>;
(since C++26)

Parameters

sender - sender upon which the completion of sync_wait is blocked

Return value

Returns an optional tuple of values that were sent by the provided sender on its completion of work.

Notes

The sender returned by sync_wait similarly to ensure_started, except that it blocks the current std::thread or thread of main until the work is completed.

See also