N
Nalaka
Hi,
in C#... I have a method that need to be executed by only one thread at a
time.
And I want the the following threads to return without entering the blocked
code section.
( if some other thread is already doing the work, I do not have to do the
work)
Something like this....
if ( myObject is locked)
{
return alreadyRunning;
}
lock(myObject)
{
\\ do work
}
return didWork;
Any direction is deeply appreciated
Thanks
Nalaka
in C#... I have a method that need to be executed by only one thread at a
time.
And I want the the following threads to return without entering the blocked
code section.
( if some other thread is already doing the work, I do not have to do the
work)
Something like this....
if ( myObject is locked)
{
return alreadyRunning;
}
lock(myObject)
{
\\ do work
}
return didWork;
Any direction is deeply appreciated
Thanks
Nalaka