/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
yt/cpp/mapreduce/common/wait_proxy.h
53 строки
2 KB
Anton Myagkov
Update ydb version to 24.4 (#4579)
07 фев 2026, 11:59
Не верифицирован
07 фев 2026, 11:59
2c21cae
Код
Авторство
О чём код?
#pragma once #include <yt/cpp/mapreduce/interface/wait_proxy.h> namespace NYT { namespace NDetail { //////////////////////////////////////////////////////////////////////////////// class TDefaultWaitProxy : public IWaitProxy { public: bool WaitFuture(const ::NThreading::TFuture<void>& future, TDuration timeout) override; bool WaitEvent(TSystemEvent& event, TDuration timeout) override; bool WaitCondVar(TCondVar& condVar, TMutex& mutex, TDuration timeout) override; void Sleep(TDuration timeout) override; }; class TWaitProxy { public: TWaitProxy(); static TWaitProxy* Get(); // NB: Non thread-safe, should be called only in initialization code. void SetProxy(::TIntrusivePtr<IWaitProxy> proxy); bool WaitFuture(const ::NThreading::TFuture<void>& future); bool WaitFuture(const ::NThreading::TFuture<void>& future, TInstant deadLine); bool WaitFuture(const ::NThreading::TFuture<void>& future, TDuration timeout); bool WaitEventD(TSystemEvent& event, TInstant deadLine); bool WaitEventT(TSystemEvent& event, TDuration timeout); void WaitEventI(TSystemEvent& event); bool WaitEvent(TSystemEvent& event); bool WaitCondVarD(TCondVar& condVar, TMutex& m, TInstant deadLine); bool WaitCondVarT(TCondVar& condVar, TMutex& m, TDuration timeOut); void WaitCondVarI(TCondVar& condVar, TMutex& m); void WaitCondVar(TCondVar& condVar, TMutex& m); void Sleep(TDuration timeout); void SleepUntil(TInstant instant); private: ::TIntrusivePtr<IWaitProxy> Proxy_; }; //////////////////////////////////////////////////////////////////////////////// } // namespace NDetail } // namespace NYT