English | 中文
The async_simple is a library offering simple, light-weight and easy-to-use components to write asynchronous codes. The components offered include the Lazy (based on C++20 stackless coroutine), the Uthread (based on stackful coroutine) and the traditional Future/Promise.
sudo apt install libaio-dev -y
# Install gtest
sudo apt install libgtest-dev -y
sudo apt install cmake -y
cd /usr/src/googletest/gtest
sudo mkdir build && cd build
sudo cmake .. && sudo make install
cd .. && sudo rm -rf build
cd /usr/src/googletest/gmock
sudo mkdir build && cd build
sudo cmake .. && sudo make install
cd .. && sudo rm -rf build
sudo yum install libaio-devel -y
sudo yum install cmake -y
# Try to build gtest and gmock from source
# libaio
# you can skip this if you install libaio from packages
git clone https://pagure.io/libaio.git
cd libaio
sudo make install
# gmock and gtest
git clone git@github.com:google/googletest.git -b v1.8.x
cd googletest
mkdir build && cd build
cmake .. && sudo make install
Required Compiler: clang (>= 11.0.1) or gcc (>= 10.3)
Demo example depends on standalone asio(https://github.com/chriskohlhoff/asio/tree/master/asio), the commit id:f70f65ae54351c209c3a24704624144bfe8e70a3
$ mkdir build && cd build
CXX=clang++ CC=clang cmake ../ -DCMAKE_BUILD_TYPE=[Release|Debug]
# for gcc, use CXX=g++ CC=gcc
make -j4
make test # optional
make install # sudo if required
After installing and reading Lazy to get familiar with API, here is a demo use Lazy to count char in a file.
- Read the How to fix issue document firstly.
- Run tests and
git-clang-format HEAD^
locally for the change. - Create a PR, fill in the PR template.
- Choose one or more reviewers from contributors: (ChuanqiXu9, RainMark, foreverhy, qicosmos).
- Get approved and merged.
async_simple is distributed under the Apache License (Version 2.0) This product contains various third-party components under other open source licenses. See the NOTICE file for more information.