Bug in Boost 1.35/Threads, Condition::notify_one
There is a bug in Boost.Threads 1.35 (tracked as #1803) – basically, condition::notify_one
may fail to wake-up a thread. It is fixed on the trunk (r44150 – thanks Anthony Williams for the quick fix). The bug might not sound that serious, however, it can have serious consequences: I have a thread-pool class which uses it, and because of this bug sometimes a new job didn’t get scheduled properly as all threads were waiting, and a thread remained sleeping although there was a job with no assigned thread. The good thing is that this thread-pool has been already tested with a different condition implementation before (my own ;) ) and it was also prototyped with Python to check for algorithmic mistakes, so I could quickly track it down to be a Boost issue (first time I found a new bug in Boost, and a quite tricky one even). Anyway, before using Boost.Thread in production applications, you might be better off waiting for 1.35.1 or 1.36. Besides this bug, the library seems to work perfectly, couldn’t find any other problem.
Update: Has been fixed in Boost 1.36.