The "no gc" crowd
Jacob Carlborg
doob at me.com
Thu Oct 10 11:42:31 PDT 2013
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
More information about the Digitalmars-d
mailing list