Use a global variable (nThread in the example) that you initialise to the
number of threads you must synchronise. Then, put this 2 lines in each
thread (if they are differents) :
nThread--;
while (nThread>0) Thread.Sleep(0);
"Naveen Mukkelli" <Na************@discussions.microsoft.com> a écrit dans le
message de news:F4**********************************@microsof t.com...
Hi All,
I need to block all my threads at "one statement " in my C# code.
These threads can proceed indipendently after all of the threads reach
this "one statement".
How can we do this. Kindly let me know
Cheers,
Naveen.