The "no gc" crowd
Michel Fortin
michel.fortin at michelf.ca
Thu Oct 10 07:14:55 PDT 2013
On 2013-10-10 13:03:37 +0000, Jacob Carlborg <doob at me.com> said:
> On 2013-10-10 13:17, Michel Fortin wrote:
>
>> http://michelf.ca/blog/2012/mutex-synchonization-in-d/
>
> This looks similar to what I described here:
>
> http://forum.dlang.org/thread/bsqqfmhgzntryyaqrtky@forum.dlang.org?page=19#post-l35rql:24og2:241:40digitalmars.com
Somewhat
>
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.
--
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca
More information about the Digitalmars-d
mailing list