Implement condition variables directly.