Re: Life of static variables in ASP.NET 2.0
- From: "Shimon Sim" <shimonsim048@xxxxxxxxxxxxxxxx>
- Date: Wed, 17 May 2006 22:45:51 -0400
Dictionary description on MSND does say that iteration operations are not
thread safe.
Shimon.
"CS" <CS@xxxxxxxxxxx> wrote in message
news:%23Ln17PieGHA.3640@xxxxxxxxxxxxxxxxxxxxxxx
"Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23vnKcGieGHA.3888@xxxxxxxxxxxxxxxxxxxxxxx
that isn't necessarily a good thing.
Why ?
Static entities are not necessarily thread-safe. Be careful about when
you use them.
I say it is safe. Because it is "static". Static means "fixed", not
modifiable. Otherwise,
it is dynamic, which may not be safe. Static data only get changed when
ASP.net
recycles.
Example: Static data may be loaded in a singleton class. In this case,
whomever
references the variable 1st will load the class. The class will stay there
until Asp.Net recycles
and or web server service is restarted.
Comacho
.
- Follow-Ups:
- Re: Life of static variables in ASP.NET 2.0
- From: Steven Cheng[MSFT]
- Re: Life of static variables in ASP.NET 2.0
- References:
- Life of static variables in ASP.NET 2.0
- From: Shimon Sim
- Re: Life of static variables in ASP.NET 2.0
- From: Kevin Spencer
- Re: Life of static variables in ASP.NET 2.0
- From: CS
- Life of static variables in ASP.NET 2.0
- Prev by Date: Re: Life of static variables in ASP.NET 2.0
- Next by Date: 2.0 Calendar Control - any way not to use in line?
- Previous by thread: Re: Life of static variables in ASP.NET 2.0
- Next by thread: Re: Life of static variables in ASP.NET 2.0
- Index(es):
Relevant Pages
|