
20 Jun
2009
20 Jun
'09
7:39 p.m.
Cosimo Calabrese wrote:
inline void interprocess_semaphore::post() { scoped_lock<interprocess_mutex> lock(m_mut); if(m_count == 0){ m_cond.notify_one(); } ++m_count; }
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? Thanks, Ion