
22 Jun
2009
22 Jun
'09
11:46 a.m.
Yes, I think you are right. post() should unconditionally notify_one(), otherwise, we could post() several times and only wake up one thread.
Can you test your code removing the m_count == 0 condition?
Well, I've removed the m_count == 0 condition and it seems to work properly. Every time a protected resource is freed, a notify_one() is performed and a locked thread is unlocked. Do you take in consideration a correction in a next boost release? Best, Cosimo Calabrese.