DmitryKuk / async_core
async_core is small project containing several parts (which can be used separately). You can just include header files from include/ directory and link some Boost libraries to your application.
- For example, you write application with asyncronous core, but you don't want manage your io_contexts manually.
- Another example: you want to use stackful coroutines in your application, but
boost::asio::spawnuses deprecated Boost.Coroutine. - Or, maybe, you know about asyncio from Python and want something like
asyncio_loop.run_until_complete(my_coro())or want to usestd::future-like access to coroutines result.
- Header-only asyncronous core implementation:
dkuk::async_coreininclude/dkuk/async_core.hpp- dependencies: Boost.Asio, Boost.Optional
- Header-only helpers for coroutines:
dkuk::coroutine_context+dkuk::coroutine_future+dkuk::spawn+dkuk::spawn_with_futureininclude/dkuk/spawn.hpp- based on
boost::asio::spawnandboost::context::continuation - dependencies: Boost.Asio, Boost.Context
- Compiler with C++14 support. For example, try
g++of versions 5/6/... or modernclang.- Tested:
clang++ --version: Apple LLVM version 8.0.0 (clang-800.0.42.1) on Mac OS X 10.11 - Tested:
g++-mp-6 --version: g++-mp-6 (MacPorts gcc6 6.4.0_0) 6.4.0 on Mac OS X 10.11
- Tested:
- Boost (or just some Boost libs) (
>= 1.66.0because of Boost.Asio refactoring since1.65)- Tested: Boost 1.66.0 on Mac OS X 10.11
- Boost.Build (or any other build system -- it's simple), if you want to build exemples and run tests.
- Note: Set environment variable
BOOST_ROOTto unpacked Boost directory.
- Note: Set environment variable
MIT license. See license.txt.
- See detailed description in
*.hppfiles. - Check examples in
example/directory and unit-tests intest/directory. - Build all examples and run tests with Boost.Build (in this project you can use
b2from your Boost installation). - Check
build/bin/directory. - Star or fork the repository, open issues and have a nice day!
Author: Dmitry Kukovinets, d1021976@gmail.com, 24.12.2017 01:54