Re: c# - Interlocked.Exchange and value types
- From: "S. Senthil Kumar" <senthil.thecoder@xxxxxxxxx>
- Date: 2 Aug 2005 07:54:25 -0700
Off topic, but why would you want to use the Interlocked.XXX methods
for comparing and assigning enum values? Declaring the variable as
volatile should do the job, if I read the docs correctly. The CLR
guarantees that any operation on type with size less than native ints,
is atomic, so why would you want to do Intelocked.Equals and Exchange?
Regards
Senthil
.
- Follow-Ups:
- Re: c# - Interlocked.Exchange and value types
- From: Javaman59
- Re: c# - Interlocked.Exchange and value types
- From: Pazu
- Re: c# - Interlocked.Exchange and value types
- References:
- c# - Interlocked.Exchange and value types
- From: steve
- RE: c# - Interlocked.Exchange and value types
- From: steve
- RE: c# - Interlocked.Exchange and value types
- From: Rahul Anand
- RE: c# - Interlocked.Exchange and value types
- From: Javaman59
- c# - Interlocked.Exchange and value types
- Prev by Date: Re: XML documentation on an interface
- Next by Date: Re: Forcing tcp client socket to close and not go into CLOSE_WAIT state
- Previous by thread: RE: c# - Interlocked.Exchange and value types
- Next by thread: Re: c# - Interlocked.Exchange and value types
- Index(es):
Relevant Pages
|