Additional synchronization primitives for boost::asio::awaitable coroutines.
Based on cppcoro.
- C++23 complier (GCC 13)
- CMake
- Boost
git clone https://github.com/dvetutnev/boost_asio_awaitable_ext.git
cd boost_asio_awitable_ext
All commands run in folder of repository.
Detect platform (optional)
conan profile detect --force
CC and CXX: gcc, g++
Found gcc 12.2
gcc>=5, using the major as version
gcc C++ standard library: libstdc++11
Detected profile:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=12
os=Linux
Install depependecies
conan install -s build_type=Debug -of build --build missing conanfile.py
Build and tests
cmake --list-presets
Available configure presets:
"conan-debug" - 'conan-debug' config
cmake --preset conan-debug
cmake --build build
ctest --preset conan-debug
ThreadSanitizer tests
git submodule update --init
cmake --preset conan-debug -D TSAN_TESTS=ON
cmake --build build
ctest --preset conan-debug
Get shell with all dependecies
nix-shell --pure
Build and tests
[nix-shell]$ cmake -B build -D CMAKE_BUILD_TYPE=Debug
[nix-shell]$ cmake --build build
[nix-shell]$ ctest --test-dir build
ThreadSanitizer tests
[nix-shell]$ git submodule update --init
[nix-shell]$ cmake -B build -D TSAN_TESTS=ON
[nix-shell]$ cmake --build build
[nix-shell]$ ctest --test-dir build
$ docker run --name local-nats -p 4222:4222 -p 8222:8222 nats -m 8222 --auth token
$ nix-shell -p natscli
[nix-shell:~]$ nats sub --server=token@localhost a.b
08:44:25 Subscribing on a.b
[#1] Received on "a.b"
45
[nix-shell:~]$ nats --server=token@localhost pub a.b 45
08:45:30 Published 2 bytes to "a.b"