segunda-feira, 20 de julho de 2015

3 Threads 1 Join



How to parallel Methods in C#. (old school)


                ThreadStart job2 = new ThreadStart(SearchMethod1);
                Thread thread2 = new Thread(job2);
                thread2.Start();

                ThreadStart job1 = new ThreadStart(SearchMethod2);
                Thread thread1 = new Thread(job1);
                thread1.Start();

                ThreadStart job3 = new ThreadStart(SearchMethod3);
                Thread thread3 = new Thread(job3);
                thread3.Start();


                thread1.Join();
                thread2.Join();
                thread3.Join();




#who am I
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();


Compartilhar
Postar um comentário