示例#1
0
        public static void Start()
        {
            Syracuse r = new Syracuse();

            r.Iteration = 989_345_275_647;

            const int NB_THREADS = 5;

            Thread[] threads = new Thread[NB_THREADS];

            for (int i = 0; i < NB_THREADS; i++)
            {
                threads[i] = new Thread(() => new PartieConcurrente(r).Run());
            }

            foreach (Thread t in threads)
            {
                t.Start();
            }

            foreach (Thread t in threads)
            {
                t.Join();
            }
        }
示例#2
0
 public PartieConcurrente(Syracuse r)
 {
     this.syracuse = r;
 }