Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一个线程池来处理项目中的COM对象ASP.NET。
COM
ASP.NET
QueueUserWorkItemSTA(WaitCallback)
来自Smart Thread Pool的 CodeProject 文章:
另请注意,.NET ThreadPool 不支持使用单线程单元 (STA) 调用 COM,因为 ThreadPool 线程在设计上是 MTA。
所以我假设如果你尝试一下 Smart Thread Pool,它可以满足你的要求。
就个人而言,我已经成功使用了这门课几年了。