Add async::make_ready_future(T const &)
This commit is contained in:
parent
059b2b1539
commit
56d23480b0
1 changed files with 8 additions and 0 deletions
|
|
@ -379,6 +379,14 @@ namespace psemek::async
|
|||
return p.get_future();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
future<T> make_ready_future(T const & x)
|
||||
{
|
||||
promise<T> p;
|
||||
p.set_value(x);
|
||||
return p.get_future();
|
||||
}
|
||||
|
||||
template <typename Signature>
|
||||
struct packaged_task;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue