##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::packaged_task::make_ready_at_thread_exit

From cppreference.com
< cpp‎ | thread‎ | packaged task

void make_ready_at_thread_exit( ArgTypes... ); |  | (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 not made ready until the current thread exits and all objects of thread local storage duration are destroyed. After and any threads waiting for this are unblocked.

### [edit] Parameters

args | - | the parameters to pass on invocation of the stored task

### [edit] Return value

(none)

### [edit] Exceptions

std::future_error on the following error conditions:

- The stored task has already been invoked. The error category is set to `promise_already_satisfied`.
- *this has no shared state. The error category is set to `no_state`.

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

operator() | executes the function (public member function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/thread/packaged_task/make_ready_at_thread_exit&oldid=63453"
Category:

- Todo no example