YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
simple.cpp File Reference
#include <yaclib/async/contract.hpp>
#include <yaclib/async/future.hpp>
#include <yaclib/async/promise.hpp>
#include <yaclib/async/run.hpp>
#include <yaclib/exe/executor.hpp>
#include <yaclib/exe/strand.hpp>
#include <yaclib/runtime/fair_thread_pool.hpp>
#include <yaclib/util/intrusive_ptr.hpp>
#include <yaclib/util/result.hpp>
#include <chrono>
#include <exception>
#include <iostream>
#include <string>
#include <type_traits>
#include <utility>
#include <gtest/gtest.h>
Include dependency graph for simple.cpp:

Go to the source code of this file.

Classes

class  CalculatorService
 

Functions

 TEST (Example, HelloWorld)
 
 TEST (Example, Detach)
 
 TEST (Example, Then)
 
 TEST (Example, Pipeline)
 
 TEST (Example, AsyncPipeline)
 
 TEST (Example, Race)
 
 TEST (Example, StrandAsync)
 

Function Documentation

◆ TEST() [1/7]

TEST ( Example  ,
AsyncPipeline   
)

Definition at line 132 of file simple.cpp.

References CalculatorService::Double(), and CalculatorService::Increment().

◆ TEST() [2/7]

TEST ( Example  ,
Detach   
)

Definition at line 39 of file simple.cpp.

References yaclib::Run().

◆ TEST() [3/7]

TEST ( Example  ,
HelloWorld   
)
Examples
simple.cpp, strand.cpp, when_all.cpp, and when_any.cpp.

Definition at line 27 of file simple.cpp.

References yaclib::MakeContract().

◆ TEST() [4/7]

TEST ( Example  ,
Pipeline   
)

Definition at line 79 of file simple.cpp.

References yaclib::Run().

◆ TEST() [5/7]

TEST ( Example  ,
Race   
)
Todo:
Add WhenAny example

Definition at line 156 of file simple.cpp.

References yaclib::MakeContract(), and yaclib::Run().

◆ TEST() [6/7]

TEST ( Example  ,
StrandAsync   
)

Definition at line 176 of file simple.cpp.

References yaclib::MakeStrand(), and yaclib::Run().

◆ TEST() [7/7]

TEST ( Example  ,
Then   
)