title: C# - Threading tasks - best practices in Dotnet 4.x
body: <p>In .NET 2.x i was using</p>
  
  <pre><code> var SocketStart = new Thread(() =&gt; new WebSocketManager().Socket()); //to prepare websocket manager in background.
   SocketStart.Start(); //to start ws manager.
   var SocketStart2 = new Thread(() =&gt; new WebSocketManager().Socket2()); //to prepare websocket manager in background.
   SocketStart2.Start(); //to start ws manager.
   if(SomeDepedencyIsDead) //chacking if some stuff is working? 
     {
       SocketStart().Suspend(); //deprecaced
       SocketStart2().Suspend(); //deprecaced
        while(SomeDepedencyIsDead)
          {
             Wait();
          }
      SocketStart.Resume(); //deprecaced
      SocketStart2.Resume(); //deprecaced
      }
  </code></pre>
  
  <p>Now </p>
  
  <blockquote>
    <p>SocketStart().Suspend() is deprecaced &amp;&amp; 
    SocketStart().Resume() is deprecaced</p>
  </blockquote>
  
  <p>And it gives me error</p>
  
  <blockquote>
    <p>System.PlatformNotSupportedException: 'Thread suspend is not supported on this platform.'</p>
  </blockquote>
  
  <p>So, what is the best practice to pause, and start Threads? Should i use <strong>new Thread(())</strong> etc? Are there any better than <strong>System.Threading</strong> libraries to threading managment? </p>