std::packaged_task
From cppreference.com
Template:cpp/thread/packaged task/sidebar Template:ddcl list begin <tr class="t-dsc-header">
<td>Defined in header
</td>
<future>
<td></td> <td></td> </tr> <tr class="t-dcl ">
<td >template< class > class packaged_task; //not defined
</td>
<td > (1) </td> <td > Template:mark c++11 feature </td> </tr> <tr class="t-dcl ">
<td >template< class Function, class Args... >
class packaged_task<Function(Args...)>;
</td>
class packaged_task<Function(Args...)>;
<td > (2) </td> <td > Template:mark c++11 feature </td> </tr> Template:ddcl list end
The class template std::packaged_task
packages a function to store its return value that is later acquired asynchronously via a Template:cpp object, that the std::packaged_task
can supply.
This section is incomplete |
Contents |
Member functions
constructs the task object (public member function) | |
destructs the task object (public member function) | |
moves the task object (public member function) | |
checks if the task object has a valid function (public member function) | |
swaps two task objects (public member function) | |
Getting the result | |
returns a future associated with the promised result (public member function) | |
Execution | |
executes the function (public member function) | |
executes the function ensuring that the result is ready only once the current thread exits (public member function) | |
resets the state abandoning any stored results of previous executions (public member function) |
Non-member functions
This section is incomplete |