Mark future::wait as const

This commit is contained in:
Nikita Lisitsa 2020-11-21 15:31:55 +03:00
parent fb9f1d8f30
commit 8ecf10de30

View file

@ -60,20 +60,20 @@ namespace psemek::util
, f_(state_->promise.get_future())
{}
bool wait()
bool wait() const
{
f_.wait();
return true;
}
template <typename Duration>
bool wait_for(Duration period)
bool wait_for(Duration period) const
{
return f_.wait_for(period) == std::future_status::ready;
}
template <typename TimePoint>
bool wait_until(TimePoint time)
bool wait_until(TimePoint time) const
{
return f_.wait_until(time) == std::future_status::ready;
}