Active Object -- Rainer Grimm
The 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.
Active Object
by Rainer Grimm
From the article:
The Active Object decouples method invocation from method execution. The method invocation is performed on the client thread, but the method execution is on the Active Object. The Active Object has its thread and a list of method request objects (short request) to be executed. The client’s method invocation enqueues the requests on the Active Object’s list. The requests are dispatched to the servant.
When many threads access a shared object synchronized, the following challenges must be solved:
- A thread invoking a processing-intensive member function should not block the other threads invoking the same object for too long.
- It should be easy to synchronize access to a shared object.
- The concurrency characteristics of the executed requests should be adaptable to the concrete hardware and software.

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held
A few years ago, I showed an interesting implementation for self-registering classes in factories. It works, but one step might be at the edge of Undefined behavior. Fortunately, with C++20, its new constinit keyword, we can update the code and ensure it’s super safe.
Registration is now open for CppCon 2023! The conference starts on October 1 and will be held
You may have a class that you want to participate in RVO or NRVO, but you also don’t want it to be moved. For example, it may contain a std::mutex, which is not movable. But you nevertheless have to declare a move constructor. What can you do?
Sorting algorithms have been thoroughly studied. Kevlin Henney takes an unexpected paradigm journey into sleep sort.
Registration is now open for CppCon 2023! The conference starts on October 1 and will be held
std::move can allow the efficient transfer of resources from object to to object. Andreas Fertig reminds us that using std::move inappropriately can make code less efficient.
Is it possible to extend a value type in C++? Alf Steinbach describes how to extend enum values.