https://github.com/maxrt101/asyncpp
Async C++ Utilities
https://github.com/maxrt101/asyncpp
async cpp17 multiprocessing multithreading threading
Last synced: 5 months ago
JSON representation
Async C++ Utilities
- Host: GitHub
- URL: https://github.com/maxrt101/asyncpp
- Owner: maxrt101
- License: mit
- Created: 2022-08-08T23:20:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-26T11:39:33.000Z (over 2 years ago)
- Last Synced: 2023-04-26T12:59:18.887Z (over 2 years ago)
- Topics: async, cpp17, multiprocessing, multithreading, threading
- Language: C++
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Async CPP
Some utilities for async programming in C++ that I use.
Built on top of standard concurrency support headers (`thread`, `atomic`, `condition_variable`, etc).
The main rationale behind this library (aside from just collecting everything that I have ever written on multithreading) is the ease of use.
Standard library is often cryptic, and while it allows for far greater configuration, if you haven't used it for some time - you will surely need to look into the docs.
Asyncpp, on the other hand, aims to be straightforward and easy to use.
## How to install
Prerequisites: `gcc`/`clang`, `make`
Steps:
- Clone the repo
- Run `make PREFIX=/path/to/installation/dir`
The headers will be installed into `/path/to/installation/dir/include/asyncpp`
## Features
- Simple `async`/`await` (async returns future, await blocks until the future is ready)
- Thread Pool with templated Task class
- Configurable Executors
- Delayed (Timer)
- Interval
- Single threaded
- Multi threaded
- Custom Future
- Lock (also provides scoped lock)
- Locked (couples resource and a lock)
- Multiprocessing heplers (`launch`/`launchSync`/`launchAsync` functions)
- Convinience functions such as `sleep`