Export (0) Print
Expand All

packaged_task Class

Describes an asynchronous provider that is a call wrapper whose call signature is Ty(ArgTypes...). Its associated asynchronous state holds a copy of its callable object in addition to the potential result.

template<class>
class packaged_task;

Name

Description

packaged_task::packaged_task Constructor

Constructs a packaged_task object.

packaged_task::~packaged_task Destructor

Destroys a packaged_task object.

Name

Description

packaged_task::get_future Method

Returns a future object that has the same associated asynchronous state.

packaged_task::make_ready_at_thread_exit Method

Calls the callable object that's stored in the associated asynchronous state and atomically stores the returned value.

packaged_task::reset Method

Replaces the associated asynchronous state.

packaged_task::swap Method

Exchanges the associated asynchronous state with that of a specified object.

packaged_task::valid Method

Specifies whether the object has an associated asynchronous state.

Name

Description

packaged_task::operator= Operator

Transfers an associated asynchronous state from a specified object.

packaged_task::operator() Operator

Calls the callable object that's stored in the associated asynchronous state, atomically stores the returned value, and sets the state to ready.

packaged_task::operator bool Operator

Specifies whether the object has an associated asynchronous state.

Header: future

Namespace: std

Show:
© 2014 Microsoft