On 2013-10-10 16:14, Michel Fortin wrote:
similar. I don't think it's a good practice to make a mutex part of the public interface of an object (or any public interface for that matter), which is why they're kept private inside the class in my examples. Public mutexes can be locked from anywhere in your program, they lack encapsulation and this makes them prone to deadlocks.
Right, it's better to keep them private. -- /Jacob Carlborg