Re: c# lock



aaah sorry Nicholas,
I am using outLook express to look at this thread... it does not show my
yesterday's post.
I thought my yestreday's post did not go through... thats why I posted
again.

sorry again
Nalaka



"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:eFVNECRrHHA.500@xxxxxxxxxxxxxxxxxxxxxxx
What was wrong with the previous answers?

http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/3b12fd804074b36d/3928a655441147c5?lnk=st&q=Nicholas+Paldino+c%23+lock&rnum=2#3928a655441147c5


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"Nalaka" <nalaka12@xxxxxxxxxxxxx> wrote in message
news:ucPrZ7QrHHA.3248@xxxxxxxxxxxxxxxxxxxxxxx
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






.



Relevant Pages

  • Re: Outlook 2007 wont send mail
    ... Nicholas J wrote: ... problems with Vista, Outlook has generally behaved itself until ... Items go from the outbox ...
    (microsoft.public.outlook.installation)
  • Re: How do I share contacts between profiles?
    ... Each profile can use the same Outlook Data File. ... "Nicholas" wrote in message ... > New user of XP Pro, familiar with basic use of Outlook. ...
    (microsoft.public.outlook.contacts)