Add async::make_ready_future
This commit is contained in:
parent
4914be8099
commit
08d71a8496
1 changed files with 8 additions and 0 deletions
|
|
@ -306,6 +306,14 @@ namespace psemek::async
|
|||
std::shared_ptr<detail::task_state<void>> state_;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
future<T> make_ready_future(T && x)
|
||||
{
|
||||
promise<T> p;
|
||||
p.set_value(std::move(x));
|
||||
return p.get_future();
|
||||
}
|
||||
|
||||
template <typename Signature>
|
||||
struct packaged_task;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue