title: Waiting for a positive response (from a server)
body: <p>Following the good ideas that I was given in my previous question on <a href="https://stackoverflow.com/questions/51281620/using-a-timer-to-wait-for-processes-to-complete/51282349#51282349"> how to wait for processes to complete</a> I would like to ask something related.</p>
  <p>This time I don't have two processes to do one after another, but only one process that has to proceed <em>after</em> it gets a positive response from a server. Something like this</p>
  <pre><code>private async Task&lt;bool&gt; requestPermission()
  {
      var result = await sendRequestToServer();
      return result;
  }
  
  private async Task Process1()
  { bool amIOktoGo=false;
     amIOktoGo= await requestPermission();
     while(!amIOktoGo)
     {
        await Task.Delay(1000);
       amIOktoGo= await requestPermission();
      } 
  
     
    //Finally! Do some more stuff involving awaits and requests from the server
  
  }
  </code></pre>
  <p>Again, this seems overly complicated. Is there a simpler way to do this?</p>