title: When using FileStream.WriteAsync() what happens when the method is called again
body: <p>I am recording a video stream to disk. For this I use the following code:</p>
  
  <pre><code>private async Task SaveToFile(IntPtr data, Int32 size)
  {
      if (_FileStream == null) return;
      Byte[] buf = new Byte[size];
      Marshal.Copy(data, buf, 0, size);
      //dont await here - just continue
      _FileStream.WriteAsync(buf, 0, size);
  }
  </code></pre>
  
  <p>So far it seems to work without issue. What I just want to confirm is what happens if this method is called before the previous iteration has finished.</p>
  
  <p>You will notice I don't await on the <code>WriteAsync()</code> call. I'm not sure if this is correct, but the API I am using states to keep operations to a minimum inside this method, so as to not block the callback internally in the API. This seems like to correct thing to do, simply pass the data to the stream, and return immediately.</p>
  
  <p>Can someone please confirm what happens if the last <code>WriteAsync()</code> call hasn't finished, and I call <code>WriteAsync()</code> again? Or should I be <code>await</code>ing the WriteAsync() call?</p>
  
  <p>EDIT:
  I am yet to experience exceptions using the above method, so I guess my last question is are there any repercussions when using WriteAsync() from inside an external DLL callback? The DLL is a third party Directshow component. I cannot verify how it internally works, but it simply provides me with data via a callback, in which i save to the filestream. </p>