title: Internal of .NET timer controller
body: <p>In VB.NET or C#, windows form applications can be added a timer controller to run tasks in scheduled manner. But what is the internal implementation of a timer? Does it use a separate thread for each timer? or Thread pool? or other concurrent programming paradigm?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Additionally, I want to know does the timer controller satisfy concurrent safty property as described below?</p>
  
  <pre><code>Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
      i = i + 1 //Line 1
                //Line 2, some code is here will takes some cpu time
      i = i - 1 //Line 3
                //Line 4, some code is here; takes another cpu time
  End Sub
  </code></pre>
  
  <p>Can we guarantee that public variable <code>i</code> always have the values 1 or 0?</p>