On 2013-10-10 13:03:37 +0000, Jacob Carlborg <[email protected]> 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/[email protected]?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
[email protected]
http://michelf.ca