Michal Kohutek

Serialising C++ classes while writing as little code as possible, part 2

Serialising C++ classes into an easy to read form and back is relatively easy and done often. However, ad hoc solutions tend to be extremely repetitive. This library is probably the absolutely briefest way of writing the information that it is to be serialised and how it is to be serialised into syntactically valid C++ code.

Merging many rarely active threads into one

It often happens that a program needs to run a lot of short functions periodically, with various periods. An easy way to do it is to create a thread for each that performs the function and sleeps the rest of the time. This approach, however, doesn’t scale well. Here is an efficient and relatively simple solution to the problem in C++.