title: Worker Thread synchronisation in .NET
body: <p>I understand that ASP.NET has worker threads and IO threads.  You can also create your own threads using: System.Threading.Thread.</p>
  
  <p>Please see the code below:</p>
  
  <pre><code>SyncLock myLogFile
      myLogFile.WriteLine("message");
  End SyncLock
  </code></pre>
  
  <p>If you do not create any instances of System.Thread in an ASP.NET application, then is it necessary to synchronize access to the log file?  If there are multiple users concurrently accessing the web application then it could mean multiple worker threads are writing to the log file at the same time.</p>
  
  <p>I have read questions like this: <a href="https://stackoverflow.com/questions/3687776/synchronization-in-multi-threading-in-net">Synchronization in multi threading in .net</a>, but I have not found an answer to my question.</p>
  
  <p>I actually use Log4Net for logging in .NET application.  The purpose of this question is to satisfy curiosity.</p>