This repository contains a list of small experiments for modern c++ concurrency.
These experiments address basic questions such as :
- What are the possible ways to build a thread ?
- How to pass parameters to a thread ?
- How to transfer the ownership of a thread ?
- What are the useful operations on threads ?
- Ensure single execution in multithreaded context ?
- ...
It should also provide sample code examples for more advanced topics such as :
- RAII Thread wrapper
- Thread-safe Cout wrapper
- Communication between threads...
- Thread-safe Stack : Access to shared data and locking mechanisms
- Thread safe queue : Using condition_variables
- Background tasks using std::async
- Usage of std::packaged_task
- Lock-based thread-safe data structures and algorithms
- Thread pools
- ...
I will also try to understand the enhancements of the latest c++ standards C++17/C++20.
- STL algorithms execution policy
- JThread
- Coroutines
This repository is highly inspirated by books and online ressources such as :
Of course, the ressources used will be quoted in each sample code.