Re: [ADVANCED-DOTNET] Multithreading question

2004-10-19 Thread Leonardo Constantino - nTime
e produces the following output. myAL is not synchronized. mySyncdAL is synchronized. */ []s Leonardo Constantino -Original Message- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Srihari Angaluri Sent: quarta-feira, 13 de outubro de 2004 12

Re: [ADVANCED-DOTNET] Multithreading question

2004-10-13 Thread Srihari Angaluri
sage- > > From: Unmoderated discussion of advanced .NET topics. > > [mailto:[EMAIL PROTECTED] On Behalf Of > > Sriram Krishnan > > Sent: 12 October 2004 16:07 > > To: [EMAIL PROTECTED] > > Subject: Re: [ADVANCED-DOTNET] Multithreading question > > > > I

Re: [ADVANCED-DOTNET] Multithreading question

2004-10-12 Thread Richard Blewett
TED] > Subject: Re: [ADVANCED-DOTNET] Multithreading question > > I don't think this will help you. myList.SyncRoot does the > locking for you when you go through it - but I don't think > locking on it is going to achieve anything. > > To keep something safe, you have

Re: [ADVANCED-DOTNET] Multithreading question

2004-10-12 Thread Palmer Fred
That article link: http://msdn.microsoft.com/msdnmag/issues/03/01/NET/default.aspx Fred -Original Message- From: Andrew Gayter [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 12, 2004 9:52 AM To: [EMAIL PROTECTED] Subject: **Spam** Re: [ADVANCED-DOTNET] Multithreading question It

Re: [ADVANCED-DOTNET] Multithreading question

2004-10-12 Thread Sriram Krishnan
nmoderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of > Steve Lydiatt > Sent: 12 October 2004 19:54 > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Multithreading question > > How about. > > lock( myList.SyncRoot) > { > e

Re: [ADVANCED-DOTNET] Multithreading question

2004-10-12 Thread Andrew Gayter
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Johnson Sent: 12 October 2004 14:38 To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Multithreading question When you "lock" an object, there's no protection against other threads accessing that object. The system simply enforces the cons

Re: [ADVANCED-DOTNET] Multithreading question

2004-10-12 Thread Steve Lydiatt
How about. lock( myList.SyncRoot) { etc. } On Tuesday, October 12, 2004, at 02:53PM, Steve Johnson <[EMAIL PROTECTED]> wrote: >When you "lock" an object, there's no protection against other threads >accessing that object. The system simply enforces the constraint that >only 1 thread

Re: [ADVANCED-DOTNET] Multithreading question

2004-10-12 Thread Steve Johnson
When you "lock" an object, there's no protection against other threads accessing that object. The system simply enforces the constraint that only 1 thread that "asks" for the lock will be granted that lock at a time. You need to ensure that every place in your code that accesses your array list a

Re: [ADVANCED-DOTNET] Multithreading question

2004-10-12 Thread [EMAIL PROTECTED]
Thanks Thomas. I know where i have mis understood the lock statement. Thanks Dan Thomas Tomiczek wrote: Oh, this is a pretty basic, but shows some musunderstandings. Inline... -Original Message- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of [

Re: [ADVANCED-DOTNET] Multithreading question

2004-10-12 Thread Ryan Heath
Daniel wrote: > but when i only put a lock on the only method that enumerates > through a arraylist i get a enumeration violation because of > modification to the array during enumeration. I dont see how this is > possible if i put a lock on the object that contains the arraylist while > i enumera

Re: [ADVANCED-DOTNET] Multithreading question

2004-10-12 Thread Thomas Tomiczek
Oh, this is a pretty basic, but shows some musunderstandings. Inline... > -Original Message- > From: Unmoderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Dienstag, 12. Oktober 2004 10:08 > To: [EMAIL PROTECTED] > Subject: