13#include <gtest/gtest.h>
18TEST(Example, FairThreadPool) {
19 std::cout <<
"FairThreadPool" << std::endl;
23 std::atomic<std::size_t> counter{0};
26 constexpr std::size_t kIncrements = 1000;
28 constexpr std::size_t kIncrements = 100500;
31 for (std::size_t i = 0; i < kIncrements; ++i) {
33 counter.store(counter.load() + 1);
40 std::cout <<
"Counter value = " << counter <<
", expected " << kIncrements << std::endl;
42 std::cout << std::endl;
TODO(kononovk) Doxygen docs.
void Submit(IExecutor &executor, Func &&f)
Submit given func for details.
TEST(Example, HelloWorld)