ASP.NET - Thread Safe

  • Thread starter Thread starter Izi
  • Start date Start date

Izi

Izi

Soldato
Joined
9 Dec 2007
Posts
2,718
I am currently learning ASP.NET. A topic which keeps appearing when I am learning different things is thread safety - This recently came about when implementing a custom profile provider with asp.net membership.

What is thread safety? When does it become necessary to care about thread safety?

I have tried researching this subject, but I cant find articles in layman terms.. Which is what I need :)
 
Think of a single-threaded program as being one person completing a task by doing one step after the other.

It might be faster or more appropriate to complete that task by having multiple people work on different parts of it at the same time. Thread safety is making sure that what one of those people is doing doesn't bugger up what another person is doing, or the task as a whole. I.e. they need to communicate and coordinate with each other.

You should care about thread safety in any situation where your program has multiple threads and the framework you're using doesn't say it'll take care of thread safety issues for you. A lot of software these days has a fair chance of being multi-threaded to some degree.
 
Last edited:
Back
Top Bottom