title: Is it good to change threads to async-await template?
body: <p>Some time ago I was faced with a task, described below, the project used .net 4.0 and now I am wonder if it would be good to use async-await in that situation if there was such possibilty(the method is run by delegate should download lots of files). I have read different articles to clear up my curiosity but not sure that I have rigt thoughts.</p>
  
  <pre><code> public static void StartBackgroundThread(ParameterizedThreadStart 
          threadstart, string name = "", object parameter = null)
      {
          if (ConcQueue.Count == 0)
          {
              ConcQueue.Enqueue(threadstart);
          }
          else
          {
              foreach (var element in ConcQueue)
              {
                  if (element.Method.Name == threadstart.Method.Name)
                  {
                      return;
                  }
              }
          }
  
          if (!HasBackgroundThread)
          {
              HasBackgroundThread = true;
              try
              {
                  ParameterizedThreadStart result;
                  ConcQueue.TryDequeue(out result);
                  _backgroundThread = new Thread(result) { Name = name };
                 _backgroundThread.Start(parameter);
              }
              catch (Exception)
              {
                  throw;
              }
          }
      }
  </code></pre>
  
  <p>how would you refactor this piece of code in terms of threads\async? and would you? and is it better to use async-await or threads?</p>