Sounds like you are looking for a barrier. Have a look at http://www.boost.org/doc/libs/1_46_1...ation.barriers