subj?
subj?
MartinCode:public class SomeClass
{
protected AutoResetEvent evt;
protected void Thread1Fnc()
{
evt.WaitOne();
MessageBox.Show("Thread1: The event has been signaled");
}
protected void Thread2Fnc()
{
MessageBox.Show("Thread2: Press OK to signal the event");
evt.Set();
}
// ...
public void Test()
{
evt = new AutoResetEvent(false);
Thread th1 = new Thread(ThreadStart(Thread1Fnc));
Thread th2 = new Thread(ThreadStart(Thread2Fnc));
th1.Start();
th2.Start();
}
}
wow thankx
my method is same as martin the only diff is i keep all objects n 1 class so that i can access that ref. in thread.
Paresh