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
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
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
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
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
[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
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
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
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
[
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
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:
11 matches
Mail list logo