17#include <gtest/gtest.h>
22using namespace std::chrono_literals;
27TEST(Example, WhenAny) {
30 std::vector<yaclib::FutureOn<int>> futs;
34 for (
int i = 0; i < 5; ++i) {
46 std::cout <<
"Any value: " << std::move(any).Get().Ok() << std::endl;
TODO(kononovk) Doxygen docs.
Provides a mechanism to access the result of async operations.
auto Run(Func &&f)
Execute Callable func on Inline executor.
auto WhenAny(It begin, std::size_t count)
Create Future that is ready when any of futures is ready.
TEST(Example, HelloWorld)