Boost logo

Boost Users :

From: Phil Endecott (spam_from_boost_users_at_[hidden])
Date: 2006-01-01 13:19:12


>>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

I'm being a bit dense - a subsequent FAQ shows how you can write a
copy-constructor for a struct that contains a mutex that explicitly
copies the data, giving you a new default-constructed mutex. The
constructor can even lock the thing it is copying.

--Phil.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net