title: Using a Thread Multiple Times
body: <p>I'm trying to use a thread multiple times and have the thread stop processing if the user doesn't react fast enough.</p>
  
  <pre><code> Thread ask = new Thread (new ThreadStart (MathQuiz.prompt));
  ask.Start();
  ask.Join(30000);
  if (answer == 4)
  {
      score = score+1;
      answer = 0;
  }
  Console.WriteLine();
  Console.WriteLine("Press any key to move on to the next question!");
  Console.WriteLine();
  Console.ReadKey(true);
  Console.WriteLine("What is 15 / 3?");
  Console.WriteLine();
  ask.Start();
  ask.Join(30000);
  if (answer == 5)
  {
      score = score+1;
      answer = 0;
  }
  </code></pre>
  
  <p>...</p>
  
  <pre><code>  static void prompt()
    {
      preanswer = (Console.ReadLine());
      if (!decimal.TryParse(preanswer, out answer))
          {
              Console.WriteLine("That wasn't even a number or decimal!");
          }
      else
          {
              answer = decimal.Parse(preanswer);
          }
    }
  </code></pre>
  
  <p>Right now it doesn't seem that the "prompt" thread is terminating, and so it crashes when the second question begins.</p>
  
  <p>So I need a solution! I of course don't mind to answer questions to help myself get an answer.</p>