Mutex in Asp.Net

Posted by Gopesh9 under ASP.NET category on | Points: 40 | Views : 2199
Suppose in your application if there are multiple threads who all are accessing the same resource, then just think that there might be a chance for dead locking. To avoid this type of dead locking we can implement synchronization of threads. Mutex is a synchronization method available in .net.

Lets just look to the example of Mutex :

Mutex m = new Mutex(false);
public void methodCall()
int value;
string name;
Thread t = Thread.CurrentThread;
name =t.Name;
for (value=0;value<= 5;value++)
System.Console.WriteLine( name + " : " + value );

Comments or Responses

Login to post response