$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Need advice on std::queue syncronization using boost::mutex - maybe a bug in pthread?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-12-12 14:41:56
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