I am doing some research on developing thread safe applications. I know users can use multiple threads on the same application (if the CPU works with more than one thread) but I am not sure what happens, and how IIS handles users when you have 5 users using the same application for example.
What does IIS do, are all the users working on the same thread? or are they given a thread each for example?
I am a newbie when it comes to IIS, so please bear with me. My question will help me understand whether I need to lock public static methods in my code (where thread safety is important).
Here is a good read to start with – ASP.NET Thread Usage on IIS 7.5, IIS 7.0, and IIS 6.0. The important thing you should remember – IIS will not create threads for users, it will create threads for concurrent calls. And of course you should create thread safe static methods, if they are not the pure.