title: Multithread in Windows Service
body: <p>I have a Windows Service executes two functions (function 1 and function2), however function2 take 5 minutes to be executed (audit users in DB).</p>
  
  <p>When I start the service, a timeout message is shown: 'ERROR: 1053'. Because function2 is slow to run, but if I comment function2, the service runs fine.</p>
  
  <p>I think MultiThread is a solution to the situation, but I am never working with this, how implement MultiThread in this service?</p>
  
  <p>My On Start function:</p>
  
  <pre><code>protected override void OnStart(string[] args)
      {
          // TODO: Add code here to start your service.
          Function1();
          Function2();
  
          aTimer.Enabled = true;
          eventLog1.WriteEntry("Starting");
      }
  </code></pre>