Pavol

Pavol

  • NA
  • 23
  • 9k

Stop current thread i stop all thread

Oct 31 2013 6:45 PM
Hello 
I need stop curent thread and dont stop all thread.
I use:
EventWaitHandle sm = new AutoResetEvent(false);

in current thread:
sm.WaitOne();

and thread:

sm.Set();

I use in current thread sm.WaitOne() so stop all thread. 
Is there a solution? I want to be sm.WaitOne() in current thread. Thanks.