Use of Async / Await to write to SQL using three Tasks
<p>I have a program that reads from 7 different PLC's at generally the same time using background threads. Using the 7 different reads, I am hoping to write to three different SQL tables.</p>

<pre><code>public static async void readReady()
{
    if (Read1_complete &amp;&amp; Read2_complete &amp;&amp; BCS_complete == true)
    {
       await Task.Run(() =&gt; W1_SQL_Write.SQL_Write_Enabled());
    }
    if (Read3_complete &amp;&amp; Read4_complete &amp;&amp; BCS_complete == true)
    {
        await Task.Run(() =&gt; W2_SQL_Write.SQL_Write_Enabled());
    }
    if (Read5_complete &amp;&amp; Read6_complete &amp;&amp; BCS_complete == true)
    {
        await Task.Run(() =&gt; W3_SQL_Write.SQL_Write_Enabled());
    }
}
</code></pre>

<p>The 7 read methods call this <code>readReady()</code> method, and if the other reads flags are set, one of the three SQL write tasks gets started.</p>

<p>I am new to async and await tasks. I am wondering if this is a good way to go about calling different methods to write to SQL?  Will the second and third "if" statements wait for the first to return, when the first "if" statement is called true before hand? </p>

<p>It is possible that all three write methods come true at the same time, so will this cause some bugs too, or is async and await the way to go about doing it?</p>