Why is boost::thread::mutex noncopyable?

Dear All,
Can someone help me to understand why boost::thread::mutex is
noncopyable? I expect that there is a good reason, but I can't see it
at the moment.
In my multithreaded application I have a struct with some uninteresting
data in it, but I want updates to the struct as a whole to be atomic so
I have a mutex. For example:
struct person {
string firstname;
string surname;
mutex m;
};
I want to be able to put these structs in a container. Say a map:
map

Phil Endecott wrote:
Can someone help me to understand why boost::thread::mutex is noncopyable? I expect that there is a good reason, but I can't see it at the moment.
http://www.boost.org/doc/html/threads/faq.html#id2786688 -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
participants (2)
-
Phil Endecott
-
Rene Rivera