Quantcast
Channel: Bartek's coding blog
Viewing all articles
Browse latest Browse all 325

Lazy initialisation in C++ and Multi-threading

$
0
0

Lazy Init, C+=, Multithreading

In the previous post about lazy initialisation, we showed examples and differences between using raw pointers, unique_ptr and std::optional to store the object and create it later. However, we implemented the samples from the perspective of single-threaded scenarios.

In this post, we’ll try to fill the gap and show you how to make your lazy objects available in a multithreading environment.

Read more...

Viewing all articles
Browse latest Browse all 325

Trending Articles