Implemented internal condition variables