C++11 concurrency: locks revisited
In a previous post about locks in C++11 I have shown a dummy implementation of a container class that looked like this (simplified): template <typename T> class container { std::recursive_mutex _lock; std::vector<T> _elements; public: void dump() { std::lock_guard<std::recursive_mutex> locker(_lock); for(auto e : _elements) std::cout << e << std::endl; } }; One can argue that the … Read more