Hello, I'm lacking a boost semaphore, so I tried to roll my own. Being carefull with threads, I present here my version, hoping you gurus will spot any flaw. class sem { sem(unsigned count): m_count(count) {} void post() { boost::mutex::scoped_lock lock(m_mutex); ++m_count; m_cond_.notify_one(); } void wait() { boost::mutex::scoped_lock lock(m_mutex); while ( m_count==0 ) m_cond.wait( lock ); --m_count; } private: unsigned m_count; boost::mutex m_mutex; boost::condition m_cond; }; Objective : I need a semaphore to sync many readers to a single input queue. If you know another implementation or solution to this specific problem, your help is welcome. Thank you.