I have a C# method, which calls an external web service multiple times, in a loop. I need to call it asynchronously in a different thread.

But the caller process MUST wait until the async thread meets a certain condition, - this condition occurs much before the loop iterations complete.

Please suggest a C# code example which describes how to wait until the async block of code indicates that a certain condition has been met, so that the main process can proceed without waiting for loop to finish.

My code:

```
..
List<MyObject> objList = GetObjects();
int counter = 0;
await Task.Factory.StartNew(() =>
{
    foreach (MyObject obj in objList)
    {
        counter++;
        CallExtWebSvc(obj);
        if (counter == 1)
        {
            // return an indication that main process can proceed.
        }
    }
});

// Do other stuff...

```