Add future::ready
This commit is contained in:
parent
ff5d778118
commit
5f91587a39
1 changed files with 5 additions and 0 deletions
|
|
@ -90,6 +90,11 @@ namespace psemek::util
|
||||||
state_->canceled = true;
|
state_->canceled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ready() const
|
||||||
|
{
|
||||||
|
return wait_for(std::chrono::seconds{0});
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<detail::task_state<T>> state_;
|
std::shared_ptr<detail::task_state<T>> state_;
|
||||||
std::future<T> f_;
|
std::future<T> f_;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue