std::mutex replacement for asynchronous tasks More...
#include <userver/engine/mutex.hpp>
Public Member Functions | |
| Mutex (const Mutex &)=delete | |
| Mutex (Mutex &&)=delete | |
| Mutex & | operator= (const Mutex &)=delete | 
| Mutex & | operator= (Mutex &&)=delete | 
| void | lock () | 
| void | unlock () | 
| bool | try_lock () | 
| template<typename Rep , typename Period > | |
| bool | try_lock_for (const std::chrono::duration< Rep, Period > &) | 
| template<typename Clock , typename Duration > | |
| bool | try_lock_until (const std::chrono::time_point< Clock, Duration > &) | 
| bool | try_lock_until (Deadline deadline) | 
std::mutex replacement for asynchronous tasks
| void engine::Mutex::lock | ( | ) | 
Locks the mutex. Blocks current coroutine if the mutex is locked by another coroutine.
| bool engine::Mutex::try_lock_for | ( | const std::chrono::duration< Rep, Period > & | duration | ) | 
| bool engine::Mutex::try_lock_until | ( | const std::chrono::time_point< Clock, Duration > & | until | ) | 
| void engine::Mutex::unlock | ( | ) | 
Unlocks the mutex. The mutex must be locked by the current coroutine.