Opened 9 years ago

Closed 9 years ago

#8615 closed Feature Requests (fixed)

Async: Replace make_future/make_shared_future by make_ready_future

Reported by: viboes Owned by: viboes
Milestone: Boost 1.55.0 Component: thread
Version: Boost 1.54.0 Severity: Not Applicable
Keywords: Cc:

Description

template <typename T>
future<typename decay<T>::type> make_ready_future(T&& value);  
future<void> make_ready_future();
template <typename T>
future<T> make_ready_future(exception_ptr ex);
template <typename T, typename E>
future<T> make_ready_future(E ex);

Effects:

  • value prototype: The value that is passed into the function is moved to the shared state of the returned function if it is an rvalue. Otherwise the value is copied to the shared state of the returned function.
  • exception: The exception that is passed into the function is copied to the shared state of the returned function.

Returns:

  • a ready future with the value set with value
  • a ready future with the exception set with ex
  • a ready future<void> with the value set (void).

Postcondition:

  • Returned future, valid() == true
  • Returned future, is_ready() = true
  • Returned future, has_value() = true or has_exception() depending on the prototype.

Change History (2)

comment:1 by viboes, 9 years ago

Milestone: To Be DeterminedBoost 1.55.0
Owner: changed from Anthony Williams to viboes
Status: newassigned

Committed revision [84493].

comment:2 by viboes, 9 years ago

Resolution: fixed
Status: assignedclosed

Changeset [85200]

Note: See TracTickets for help on using tickets.