Simple WhenAny examples.
Simple WhenAny examples
#include <chrono>
#include <iostream>
#include <type_traits>
#include <utility>
#include <vector>
#include <gtest/gtest.h>
namespace {
using namespace std::chrono_literals;
std::vector<yaclib::FutureOn<int>> futs;
for (int i = 0; i < 5; ++i) {
return i;
}));
}
std::cout << "Any value: " << std::move(any).Get().Ok() << std::endl;
tp.Stop();
tp.Wait();
}
}
}
TODO(kononovk) Doxygen docs.
Provides a mechanism to access the result of async operations.
auto Run(Func &&f)
Execute Callable func on Inline executor.
TEST(Example, HelloWorld)