hpx::shared_future#

Defined in header hpx/future.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

See also:

template<typename R>
class shared_future : public hpx::lcos::detail::future_base<shared_future<R>, R>

The class template hpx::shared_future provides a mechanism to access the result of asynchronous operations, similar to hpx::future, except that multiple threads are allowed to wait for the same shared state. Unlike hpx::future, which is only moveable (so only one instance can refer to any particular asynchronous result), hpx::shared_future is copyable and multiple shared future objects may refer to the same shared state. Access to the same shared state from multiple threads is safe if each thread does it through its own copy of a shared_future object.