title: Why ThreadPool thread doesn't print anything to console unless main thread print first
body: <p>I am very confused about below code snippet.</p>
  
  <pre><code> //Console.WriteLine("Main thread: Doing other work here...");
          ThreadPool.QueueUserWorkItem(
              state =&gt;
              {
                  for (int i = 0; i &lt; 10; i++)
                  {
                      Thread.Sleep(200);
                      Console.WriteLine("In computeBoundOp: state={0} " + i, state);
                  }
              }, 5);
   //Console.WriteLine("Hit &lt;Enter&gt; to end this program...");
   Console.ReadKey();
  </code></pre>
  
  <p>Acutally the thread pool thread doesn't print anything unless I uncomment either of the "Console.WriteLine()" before or after the ThreadPool part.(Note I even have a readkey there at the end of main thread)</p>
  
  <p>Or else, to make the background thread print something, I have to use a manualresethandle to let main thread wait the thread to complete.</p>
  
  <p>Any idea how this happenes?</p>
  
  <p>Thanks.</p>