Prathap

Prathap

  • NA
  • 38
  • 32.5k

Make worker thread Wait

Jul 28 2015 2:38 AM
Thread t = new Thread(Method1);
t.Start(); 
Thread.Sleep(2000); 
t.Join();
Thread t1 = new Thread(Method2); 
t1.Start(); 
Thread.Sleep(2000); 
t1.Join();
Thread t2 = new Thread(Method3); 
t2.Start();
How Thread.Sleep()  makes each thread wait? How is it associated with each thread?