void operator()( ArgTypes... args ); | (since C++11) |
Calls the stored task with args
as the arguments. The return value of the task or any exceptions thrown are stored in the shared state. The shared state is made ready and any threads waiting for this are unblocked.
args | - | the parameters to pass on invocation of the stored task |
(none).
std::future_error
on the following error conditions:
promise_already_satisfied
. *this
has no shared state. The error category is set to no_state
. A successful call to | (until C++14) |
No additional synchronization guarantees other than what's already provided by shared state. | (since C++14) |
executes the function ensuring that the result is ready only once the current thread exits (public member function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/thread/packaged_task/operator()