C++ Core Guidelines: A Short Detour to Contracts in C++20

My original plan was it to write in this post about the next rules to error handling. But I changed my plan to write about the future: contracts in C++20.

Read more
Views: 60646

C++ Core Guidelines: Rules for Error Handling

Error handling is an important part of writing good software; therefore, the C++ core guidelines has about 20 rules for error handling.

Read more
Views: 26609

C++ Core Guidelines: The Remaining Rules to Lock-Free Programming

Today, I will finish my story to concurrency and lock-free programming in particular. There are four rules to lock-free programming in the C++ core guidelines left.

Read more
Tags: lock-free
Views: 14596

C++ Core Guidelines: The Resolution of the Riddle

Today, I solve the riddle from my last post. Thanks to my readers, the analysis of the ABA problem is quite accurate.

Read more
Tags: lock-free
Views: 10466

C++ Core Guidelines: Concurrency and lock-free Programming

Today, I finish the rules to concurrency and continue directly with lock-free programming. Yes, you have read it correctly: lock-free programming.

Read more
Tags: lock-free
Views: 42838

C++ Core Guidelines: Be Aware of the Traps of Condition Variables

Today, I write a scary post about condition variables. You should be aware of this issues of condition variables. The C++ core guideline CP 42 just states: "Don't wait without a condition".

Read more
Views: 110464

C++ Core Guidelines: More Traps in the Concurrency

Concurrency provides many ways to shoot yourself in the foot. The rules for today help you to know these dangers and to overcome them.

Read more
Views: 7399

C++ Core Guidelines: Taking Care of your Child Thread

When you create a new child thread, you have to answer an important question: should you wait for the child or detach yourself from it? If you detach yourself from the newly created child, and your child uses variables which are bound to your lifetime as creator a new question arises: Will the variables stay valid during the lifetime of the child thread?

Read more
Views: 27878

C++ Core Guidelines: Sharing Data between Threads

If you want to have fun with threads, you should share mutable data between them. In order to get no data race and, therefore, undefined behaviour, you have to think about the synchronisation of your threads.

Read more
Tags: lock, mutex
Views: 37659

C++ Core Guidelines: Use Tools to Validate your Concurrent Code

Today, I'm happy to write about the probably most important rule of the C++ Core Guidelines for concurrency: Whenever feasible use tools to validate your concurrent code. Not all, but a lot of bugs can be detected with tools and each fixed bug is a good bug. Here are two tools which provided me precious help in the last years: ThreadSanitizer and CppMem.

Read more
Views: 15998

My Newest E-Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 3818

All 3653142

Currently are 226 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments