Daily bit(e) of C++ | std::shared_future
Daily bit(e) of C++ #246, The shared version of a future, std::shared_future.
The std::shared_future is a C++11 synchronization tool suitable for one-shot single-producer/many-consumers situations.
Unlike std::future, std::shared_future is copyable, allowing multiple instances of std::shared_future to refer to the same shared state.
Similar to std::future, std::shared_future<void> can be used for signalling.