title: Parallel while loop in C#
body: <p>I try to write BBS-generator. But this generator is too slow. So I need to parallel while. But i did not how do it. Please help me:).    </p>
  
  <pre><code> public static List&lt;BigInteger&gt; GenerateFullCycle(long N, long x0)
  { 
                List&lt;BigInteger&gt; randomNumbers = new List&lt;BigInteger&gt;();
                var bbs = new BBS_generator(N, x0);
                BigInteger rvalue = bbs.Generate();
                while(randomNumbers.Contains(rvalue) == false)
                {
                  randomNumbers.Add(rvalue);
                  rvalue = bbs.Generate();
                }
                return randomNumbers;
         }
  </code></pre>