C++ YT Wrapper
C++ library for working with YT clusters
Loading...
Searching...
No Matches
wait_proxy.h
1#pragma once
2
7
9
10#include <util/datetime/base.h>
11
12namespace NThreading {
13template <typename T>
14class TFuture;
15}
16
17class TSystemEvent;
18class TCondVar;
19class TMutex;
20
21namespace NYT {
22
24
30 : public TThrRefBase
31{
32public:
33 virtual ~IWaitProxy() = default;
34
37 virtual bool WaitFuture(const ::NThreading::TFuture<void>& future, TDuration timeout) = 0;
38
41 virtual bool WaitEvent(TSystemEvent& event, TDuration timeout) = 0;
42
45 virtual bool WaitCondVar(TCondVar& condVar, TMutex& mutex, TDuration timeout) = 0;
46
49 virtual void Sleep(TDuration timeout) = 0;
50};
51
53
54} // namespace NYT
Definition wait_proxy.h:14
Interface to facilitate customizable waiting.
Definition wait_proxy.h:31
virtual void Sleep(TDuration timeout)=0
Sleep in the current thread for (approximately) specified amount of time.
virtual bool WaitEvent(TSystemEvent &event, TDuration timeout)=0
Wait for a system event with timeout.
virtual bool WaitFuture(const ::NThreading::TFuture< void > &future, TDuration timeout)=0
Wait for the future setting with timeout.
virtual bool WaitCondVar(TCondVar &condVar, TMutex &mutex, TDuration timeout)=0
Wait for the notification on the condition variable with timeout.
Main namespace of YT client.
Definition abortable_stream.h:7