Pause loop until a task is complete

This seems to be the same code as in your other Thread.

I am suggesting to the Moderator to merge them. Double posting just wastes time.

...R