C++C++11C++14C++17C++20Learn C++

How To Use Propagating Exceptions In Modern C++?

Modern C++ has many features to aid multi-thread programming that allow applications to be faster and more responsive. The C++11 standard offers the possibility of moving an exception from one thread to another. This type of movement is called propagating exceptions, exception propagation; also known as rethrow exception in multi-threading. To do that, some modifications have been made to the…
Read more
C++C++11C++14C++17C++20Learn C++Syntax

Learn Strong Compare and Exchange In Modern C++

Since the C++11 standard, the Concurrency Support Library includes built-in support for threads (std::thread) with atomic operations (std::atomic). C++11 provides both weak and strong compare-and-exchange operations in multi-threading applications. Since C++11, strong compare and exchange are used in modern C++ standards such as C++14, C++17, C++20, and in other new standards. In this post, we…
Read more
C++C++11C++14C++17Learn C++Syntax

Learn Useful Bidirectional Fences In Modern Multi-threading C++ Apps

C++11 improved the support for bidirectional fences in multi-thread applications. In modernC++ development,Fencesare synchronization primitives in multi-threading operations, they are memory barriers in threads, and they can acquire semantics, release semantics, or both. In this post, we explain what are fences and how we can use them. What are bidirectional fences in…
Read more
C++C++11C++14C++17Learn C++Syntax

What Are Useful Atomic Load And Store Operations In C++?

The concurrency support library in modern C++ is designed to solve problems in multi-thread operations. Since the C++11 standard, this library includes built-in support forthreads (std::thread) with atomic operations (std::atomic). In this post, we explain what two atomic operations that can be used with std::atomic types, we explain what are atomic load and store operations. What is…
Read more