std::execution::sync_wait
From cppreference.com
 
 
 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Execution control library 
 
 
 
 
 
 
this_thread::sync_wait
Defined in header 
 
 
<execution> 
 auto sync_wait( execution::sender auto sender )
 
 (since C++26) 
    requires (/*always-sends-some-values*/(sender))
Contents
[edit] Parameters
 sender
 -
 sender upon which the completion of sync_wait is blocked
[edit] Return value
Returns an optional tuple of values that were sent by the provided sender on its completion of work.
[edit] 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.
[edit] See also
 
 Eagerly starts a sender, returning a sender that will deliver the results to a receiver to which it is connected and started, if any. When the result sender is not connected to a receiver, or if the resulting operation state is not started, the results are ignored. If such a sender is destroyed before the underlying operation completes, the operation continues running detached. 
(function template) [edit]
(function template) [edit]