title: Need a delay in my MVC Controller
body: <p>I want a client connection to wait for some data that may come 3 or 4 seconds later.</p>
  
  <p>The idea was to make a Thread.sleep and recheck some times but I don't want to stuck other clients because some clients won't have to wait but some do.</p>
  
  <p>I'm new to MVC and hope that you can give me some suggestions.</p>
  
  <p>/edit
  If I use this code:</p>
  
  <pre><code>    public string weatherAsync(string city)
      {
          AsyncManager.OutstandingOperations.Increment();
  
          Task.Factory.StartNew(() =&gt;
      {
          Thread.Sleep(TimeSpan.FromSeconds(10));
          AsyncManager.Parameters["output"] = DateTime.Now.TimeOfDay.ToString();
          AsyncManager.OutstandingOperations.Decrement();
      });
  
          return null;
      }
  
      public string weatherCompleted(string output)
      {
          return output;
      }
  </code></pre>
  
  <p>And request my page two times at the same time the first one returns the time after about 10 seconds and AFTER that the second page  need 10 more seconds to return the output :-/</p>
  
  <p>Is this a problem of my controller or Thread.sleep?</p>