Showing progress while waiting for all Tasks in List<Task> to complete : <p>I'm currently trying to continuously print dots at the end of a line as a form of indeterminate progress, while a large list of Tasks are running, with this code:</p>

<pre><code>start = DateTime.Now;
Console.Write("*Processing variables");
Task entireTask = Task.WhenAll(tasks);
Task progress = new Task(() =&gt; { while (!entireTask.IsCompleted) { Console.Write("."); System.Threading.Thread.Sleep(1000); } });
progress.Start();
entireTask.Wait();
timeDiff = DateTime.Now - start;
Console.WriteLine("\n*Operation completed in {0} seconds.", timeDiff.TotalSeconds);
</code></pre>

<p>Where <code>tasks</code> is from <code>List&lt;Task&gt; tasks = new List&lt;Task&gt;();</code>, <br>
and <code>tasks.Add(Task.Run(() =&gt; someMethodAsync()));</code> has occurred 10000's of times. <br>
This code currently works, however, is this the correct way of accomplishing this, and is this the most cost-effective way?</p>
