Subject: Re: [boost] [Interprocess::Semaphore] Deadlock on more producers - one consumer problem
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-06-17 14:11:30
Cosimo Calabrese wrote:
> Is there a way to unlock all the producers with the
> boost::interprocess::semaphore? Or I have mistaken the approach of the
A semaphore post only increases a waiting thread if count was 0. That's
the behaviour of a semaphore. If you want to wake up all waiters, use a
condition variable and notify_all. Take any mutex condition variable
tutorial for an example on multiple producers / consumers.
> Thanks to all,
> Cosimo Calabrese.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk