volatile - small question
- From: nick_tucker@xxxxxxxxxxx (Nick)
- Date: 4 Apr 2005 02:42:53 -0700
I am right in thinking that if I have a class that can be accessed by
more than one thread in my application then I should mark *all*
instance variables within that class with the volatile keyword.
Also is it right that if the access to the variable is within a lock
then this is not required, since all 'memory'/caches are up to date
Thanks in advance
Nick
.
- Follow-Ups:
- Re: volatile - small question
- From: Jon Skeet [C# MVP]
- Re: volatile - small question
- From: Willy Denoyette [MVP]
- Re: volatile - small question
- Prev by Date: How to control the scroolbar.location of ListView?
- Next by Date: Re: Throwing exceptions
- Previous by thread: How to control the scroolbar.location of ListView?
- Next by thread: Re: volatile - small question
- Index(es):
Relevant Pages
|