Implemented condition synchronization primitive.