
Phil Bouchard <philippe@fornux.com> writes:
On 5/17/2011 10:56 PM, Phil Bouchard wrote:
Sorry for the confusion but it turns out I won't need this operation either.
The bottom line is I would need a ~mutex() that discards errors and an atomic way of performing the following consecutive locks:
template <typename V> block_ptr & operator = (block_ptr<V> const & p) { mutex::scoped_lock scoped_lock1(ps_->redir()->mutex_); mutex::scoped_lock scoped_lock2(p.ps_->redir()->mutex_);
... }
Is boost::lock() any help here? It will lock multiple mutexes without deadlock due to ordering concerns. Anthony -- Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/ just::thread C++0x thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976