Documentation Home >> Headers >> <jss/experimental_future.hpp> Header >> std::experimental::packaged_task >> std::experimental::packaged_task::reset Member function

Associate a std::experimental::packaged_task instance with a new asynchronous result for the same task.

void reset();


*this has an associated asynchronous task.


Allocate a new asynchronous result for the task associated with *this.


If the asynchronous result associated with *this prior to the call is not ready, that asynchronous result is ready with a stored exception of type std::future_error and an error code of std::future_errc::broken_promise. *this has a new asynchronous result with no associated futures, and which is not ready.


An exception of type std::bad_alloc if memory could not be allocated for the new asynchronous result.


#include <experimental/future>

See Also