Overview

C++ Memory Model

/
Since C++11, C++ has a memory model. It is the foundation for multithreading. Without it, multithreading…
async

The Special Futures

/
The parent of a thread has to take care of their child. The parent can wait until his child is done or…
promiseFuture

Promise and Future

/
With std::promise and std::future, you have full control over the task. Full control over the task A…
BackgroundCpp

Modernes C++

/
This page is the starting point for my blog Modernes C++. A simple overview of my existing and upcoming…
packagedTask

Asynchronous Callable Wrappers

/
std::packaged_task enables you to write a simple wrapper for a callable, which you can invoke later. std::packaged_task To…
async

Asynchronous Function Calls

/
std:.async feels like an asynchronous function call. Under the hood std::async is a task. One, which…
tasksEng

Tasks

/
Tasks were one of the latest additions to the C++11 standard. They give you a better abstraction than…
conditionVariable

Condition Variables

/
Condition variables allow us to synchronize threads via notifications. So, you can implement workflows…
threadLocal

Thread-Local Data

/
By using the keyword thread_local, you define the thread local data. Thread-local can easily be…
callOnce

Thread-Safe Initialization of Data

/
The story is simple if the data is not modified when shared between threads. The data has only to be…
deadlockResolved

Prefer Locks to Mutexes

/
If the previous post showed something, it's that you should use mutexes with great care. That's why you…
Deadlock

The Risks of Mutexes

/
The usage of mutexes seems extremely simple. There is a critical section in the code that a single thread…