Mark future::wait as const
This commit is contained in:
parent
fb9f1d8f30
commit
8ecf10de30
1 changed files with 3 additions and 3 deletions
|
|
@ -60,20 +60,20 @@ namespace psemek::util
|
||||||
, f_(state_->promise.get_future())
|
, f_(state_->promise.get_future())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
bool wait()
|
bool wait() const
|
||||||
{
|
{
|
||||||
f_.wait();
|
f_.wait();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Duration>
|
template <typename Duration>
|
||||||
bool wait_for(Duration period)
|
bool wait_for(Duration period) const
|
||||||
{
|
{
|
||||||
return f_.wait_for(period) == std::future_status::ready;
|
return f_.wait_for(period) == std::future_status::ready;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename TimePoint>
|
template <typename TimePoint>
|
||||||
bool wait_until(TimePoint time)
|
bool wait_until(TimePoint time) const
|
||||||
{
|
{
|
||||||
return f_.wait_until(time) == std::future_status::ready;
|
return f_.wait_until(time) == std::future_status::ready;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue