Wait for the procedure to finish.