
18 May
2011
18 May
'11
4 p.m.
On 5/18/2011 8:45 AM, Mathias Gaunard wrote:
Combining the locking of multiple mutexes requires defining an order in which they should always be acquired so as to define a lock hierarchy.
Using the address of the mutex in question for that ordering should work.
That's unfortunate because it'll uglify the code. A more important problem is that "ps_->redir()->mutex_" and "p.ps_->redir()->mutex_" need to be called in a lock mode right before. For that I need to lock a global mutex, which I was trying not to do. -Phil