Freigeben über


packaged_task::reset Method

Uses a new associated asynchronous state to replace the existing associated asynchronous state.

void reset();

Remarks

In effect, this method executes *this = packaged_task(move(fn)), where fn is the function object that's stored in the associated asynchronous state for this object. Therefore, the state of the object is cleared, and get_future, operator(), and make_ready_at_thread_exit can be called as if on a newly-constructed object.

Requirements

Header: future

Namespace: std

See Also

Reference

packaged_task Class

<future>