title: Writing to same file concurrently delay
body: <p>I am using a socket server program which works asynchronously. I need to write the incoming packets to a  single file. There are hundreds of clients connected at a time and can write the file concurrently. Here is the code that writes the received packet to file...</p>
  
  <pre><code>static ManualResetEvent signal = new ManualResetEvent(false);
  signal.WaitOne();
  using (StreamWriter sw = new StreamWriter(path, true))
         sw.WriteLine(message);
  signal.Set();
  </code></pre>
  
  <p>The problem is that it's slowing down the next data packet to be received.</p>