Пример #1
0
 void DoWork()
 {
     Thread[] GothroughBarrier = new Thread[threadlimit];
     for (ulong i = 0; i < threadlimit -1; i++)
     {
         GothroughBarrier [i] = new Thread (GoThroughBarrier);
         ulong numberOfThreads = i + 1;
         Console.WriteLine ("Thread " + numberOfThreads + " out of " + GothroughBarrier.Count() + " Trying Through Barrier");
     }
     for (ulong i = 0; i < threadlimit - 1; i++)
     {
         GothroughBarrier [i].Start ();
     }
     Thread Last = new Thread (LastThread);
     Last.Start ();
 }