Block task execution until a condition passes.