Author Archive for: admin
About Rainer Grimm
This author has not written his bio yet.
But we are proud to say that Rainer Grimm contributed 699 entries already.
Entries by Rainer Grimm
C++23: Syntactic Sugar with Deducing This
/1 Comment/in C++23/by Rainer GrimmThe Curiously Recurring Template Pattern (CRTP) is a heavily used idiom in C++. It is similarly resistant to understanding as the classic design pattern visitor I presented in my last post: “C++23: Deducing This“. Thanks to deducing this, we can remove the C and R from the abbreviation. CRTP The acronym CRTP stands for the […]
C++23: Deducing This
/0 Comments/in C++23/by Rainer GrimmAnyone who thinks a small C++ standard follows a significant C++ standard is wrong. C++23 provides powerful extensions to C++20. These extensions include the core language, particularly the standard library. Today, I present a small but very impactful feature of the core language: deducing this. Deducing this, sometimes also called explicit object parameter, allows it […]
C++23: The Next C++ Standard
/0 Comments/in C++23/by Rainer GrimmC++23 will be the next C++ standard after C++20. This new standard significantly improves C++ but is less game-changing than C++98, C++11, or C++20. C++23 is more in the tradition of C++17. To understand this next step in the evolution of C++, let me put the C++ standards into the historical context. The C++ Standards […]
Thread-Safe Queue – Two Serious Errors
/2 Comments/in Patterns/by Rainer GrimmIn my last post “Monitor Object” I implemented a thread-safe queue. I made two serious errors. Sorry. Today, I will fix these issues. First, I want to show you again the erroneous implementation from my last post to understand the context. // monitorObject.cpp #include <condition_variable> #include <functional> #include <queue> #include <iostream> #include <mutex> #include <random> […]
Monitor Object
/0 Comments/in Patterns/by Rainer GrimmThe monitor object design pattern synchronizes concurrent member function execution to ensure that only one member function at a time runs within an object. It also allows object’s member functions to schedule their execution sequences cooperatively. (Pattern-Oriented Software Architecture: Patterns for Concurrent and Networked Objects) The Monitor Object design pattern synchronizes concurrent member function execution […]
Active Object
/0 Comments/in Patterns/by Rainer GrimmThe active object design pattern decouples method execution from method invocation for objects that each reside in their own thread of control.The goal is to introduce concurrency, by using asynchronous method invocation and a scheduler for handling requests. (Wikipedia:Active Object)