std::experi...ared_future(3)
π NAME π
Okay bestie, this page is std::experi...ared_future(3), and the manual it comes from is the C++ Standard Libary manual. The NAME section is literally std::experimental::shared_future β copy-paste energy, but make it fashion. π
β¨ Synopsis β¨
Defined in header <experimental/shared_future>
template< class T > class shared_future; (1) (concurrency TS)
template< class T > class shared_future<T&>; (2) (concurrency TS)
template<> class shared_future<void>; (3) (concurrency TS)
The class template std::experimental::shared_future extends std::shared_future with the following operations:
- an unwrapping constructor from
future<shared_future<T>>; - a member function
is_readyto query whether the associated shared state is ready; and - a member function
thento attach a continuation to the future.
There is no interoperation between std::experimental::shared_future and std::shared_future. That's not a vibe check fail, it's just the rules, bestie. π«Ά
π Member functions π
constructorβ constructs ashared_future(public member function)is_readyβ checks if the shared state is ready (public member function)thenβ attaches a continuation to ashared_future(public member function)operator=β assigns the contents (public member function)
πΈ Members identical to std::shared_future πΈ
π« Member functions π«
destructorβ destructs the future object (public member function ofstd::shared_future<T>)
π Getting the result π
getβ returns the result (public member function ofstd::shared_future<T>)
π State π
validβ checks if the future has a shared state (public member function ofstd::shared_future<T>)waitβ waits for the result to become available (public member function ofstd::shared_future<T>)wait_forβ waits for the result, returns if it is not available for the specified timeout duration (public member function ofstd::shared_future<T>)wait_untilβ waits for the result, returns if it is not available until specified time point has been reached (public member function ofstd::shared_future<T>)
π§ Example π§
This section is incomplete.
Reason: no example
π See also π
futureβ a version ofstd::futureenhanced with continuations and other (concurrency TS) features (class template)
π·οΈ Category π·οΈ
- Todo no example
Alright bestie, that's the whole page. Sign-off time: source/version is http://cppreference.com, date is 2024.06.10, and the page is std::experi...ared_future(3). Slay, read responsibly, and may your shared states always be ready. πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms