title: Why Thread.Sleep() before SerialPort.Open and Close?
body: <p>I notice sample codes I read on SerialPort closing and opening where people would add Thread.Sleep(1000) before SerialPort.Open() and Close(). Like the following:</p>
  
  <pre><code>Thread.Sleep(1000);
  serialPort1.Open();
  /* some code */
  Thread.Sleep(1000);
  serialPort1.Close();
  </code></pre>
  
  <p>I cannot find any explanation anywhere. Why do people block the serial port using Thread.Sleep before it gets Open or Close? Is it for some timing purpose? Am I supposed to put a Thread.Sleep whenever I read from or write to Serial Port as well?</p>