userver: userver/engine/sleep.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
sleep.hpp File Reference

Detailed Description

Time-based coroutine suspension helpers.

Definition in file sleep.hpp.

Go to the source code of this file.

#include <chrono>
#include <userver/engine/deadline.hpp>
+ Include dependency graph for sleep.hpp:
+ This graph shows which files directly or indirectly include this file:

Namespaces

namespace  engine
 Asynchronous engine primitives.
 

Functions

void engine::Yield ()
 Suspends execution for a brief period of time, possibly allowing other tasks to execute.
 
template<typename Rep , typename Period >
void engine::InterruptibleSleepFor (const std::chrono::duration< Rep, Period > &duration)
 
template<typename Clock , typename Duration >
void engine::InterruptibleSleepUntil (const std::chrono::time_point< Clock, Duration > &time_point)
 
template<typename Rep , typename Period >
void engine::SleepFor (const std::chrono::duration< Rep, Period > &duration)
 
template<typename Clock , typename Duration >
void engine::SleepUntil (const std::chrono::time_point< Clock, Duration > &time_point)