IIS是否给每个连接的用户一个线程? [英] Does IIS give each connected user a thread?

查看:691
本文介绍了IIS是否给每个连接的用户一个线程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做开发线程安全的应用程序的一些研究。我知道,用户可以在同一个应用程序中使用多个线程(如果CPU与一个多线程的工作),但我不知道发生了什么,以及IIS如何处理用户,当你有例如使用相同的应用5个用户。

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.

什么是IIS做什么,都是在同一线程上工作的用户?或者他们给予每个线程例如?

What does IIS do, are all the users working on the same thread? or are they given a thread each for example?

我是新手,当涉及到IIS,所以请多多包涵。我的问题会帮助我了解我是否需要锁定在我的代码(其中线程安全性是很重要的)的public static方法。

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).

推荐答案

这是一个良好的阅读入手 - 的 ASP.NET线程上的IIS 7.5使用IIS 7.0和IIS 6.0 。你应该记住的重要一点 - IIS不会为用户创建线程,它会创建并发调用线程。当然,你应该创建线程安全的静态方法,如果他们不是纯粹的。

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.

这篇关于IIS是否给每个连接的用户一个线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆