
23 Oct
2010
23 Oct
'10
11:56 a.m.
Hello all, When using unique_lock in combination with mutex, one should only lock / unlock thru the unique_lock, otherwise its managment gets corrupted. However the unlock fct. is also offered in the mutex, which makes it vunerable for small typo errors like (code simplified): void foo() { boost::mutex mtx; for (size_t n = 0; n != 2; ++n) { boost::unique_lockboost::mutex lck(mtx); //mtx.unlock(); //hang in next lock attempt lck.unlock(); //ok } } Not sure if something can be done about this; mail only meant to share information.
5236
Age (days ago)
5236
Last active (days ago)
0 comments
1 participants
participants (1)
-
gast128