
12 Dec
2008
12 Dec
'08
7:41 p.m.
AMDG Ilya Kalujny wrote:
I`d like to ask for your kind advice regarding boost::mutex behaviour.
I dont see what i`m doing wrong here. The issue is that at some point a mutex used to syncronize access to std::queue becomes locked on it's own, despite being explicitly unlocked before. I can repeat this more or less consistently. I triple checked the logic behind code and it seems correct to me.
The thread that unlocks a mutex must be the same one that locked it. You really ought to use a condition variable. In Christ. Steven Watanabe