N
Nalaka
Hi,
I need to code so that only one thread can do a piece of work... other
threads need not do the work if a thread is alredy doing the work.
something like this.....
if ( isAlreadyLocked )
{ return anotherThreadIsAlredyAtWork }
lock ( myObject )
{
// do the work
}
Any help is appreciated
Thanks
Nalaka
I need to code so that only one thread can do a piece of work... other
threads need not do the work if a thread is alredy doing the work.
something like this.....
if ( isAlreadyLocked )
{ return anotherThreadIsAlredyAtWork }
lock ( myObject )
{
// do the work
}
Any help is appreciated
Thanks
Nalaka