On 2013-10-10 13:03:37 +0000, Jacob Carlborg <d...@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/bsqqfmhgzntryyaqr...@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.for...@michelf.ca
http://michelf.ca