在委托(delegate)上调用 BeginInvoke 时,操作在单独的线程上执行。如果在 ASP.NET 中调用它是否使用 CLR 工作线程?还是使用 IIS 工作线程?
如果是后者,那么我将需要采用异步 ASP.NET 模式来确保操作在 CLR 工作线程上执行。但如果操作在 BeginInvoke 时结束,我宁愿不这样做。
最佳答案
它使用 CLR 工作线程。
如 here 中所述
To begin with, ASP.NET uses the process-wide CLR thread pool to service requests (for more background on the CLR thread pool, see the .NET column in this issue).
编辑:
另一个资源是 this blog
Unfortunately, the thread used by BeginInvoke is actually taken from the same worker thread pool that is used by ASP.Net to handle Page Requests
关于c# - 在 ASP.NET 中使用委托(delegate)来处理异步操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8153370/