title: Will using System.IO.StreamWriter & WriteLineAsync wait for a file that is being accessed by another thread
body: <p>I have the following code inside my asp.net mvc-5 web application :-</p>
  
  <pre><code>System.IO.StreamWriter file =
  new System.IO.StreamWriter(Server.MapPath("~/logs/logs.txt"), true);
  await file.WriteLineAsync("execution started at " + System.DateTime.Now.ToString());
  file.Close();
  </code></pre>
  
  <p>now my question what will happen if 2 methods execute the above code at the same time? will one of them fail ? since it will be trying to write to the txt file which is being accessed by another thread ?</p>