userver: userver/engine/wait_any.hpp File Reference
Loading...
Searching...
No Matches
wait_any.hpp File Reference

Detailed Description

Provides engine::WaitAny, engine::WaitAnyFor and engine::WaitAnyUntil.

Definition in file wait_any.hpp.

Go to the source code of this file.

#include <chrono>
#include <optional>
#include <vector>
#include <userver/engine/deadline.hpp>
#include <userver/utils/meta.hpp>
#include <userver/utils/span.hpp>
+ Include dependency graph for wait_any.hpp:
+ This graph shows which files directly or indirectly include this file:

Namespaces

namespace  engine
 Asynchronous engine primitives.
 

Functions

template<typename... Tasks>
std::optional< std::size_t > engine::WaitAny (Tasks &... tasks)
 Waits for the completion of any of the specified tasks or the cancellation of the caller.
 
template<typename... Tasks, typename Rep , typename Period >
std::optional< std::size_t > engine::WaitAnyFor (const std::chrono::duration< Rep, Period > &duration, Tasks &... tasks)
 
template<typename... Tasks, typename Clock , typename Duration >
std::optional< std::size_t > engine::WaitAnyUntil (const std::chrono::time_point< Clock, Duration > &until, Tasks &... tasks)
 
template<typename... Tasks>
std::optional< std::size_t > engine::WaitAnyUntil (Deadline, Tasks &... tasks)