开发者

How do I limit the threads in a ATL DCOM service?

开发者 https://www.devze.com 2023-04-08 23:08 出处:网络
I have an ATL service which implements a free threaded COM object. Our testers are running more and more threads against the service but this eventually results in an ugly runtime crash when it starts

I have an ATL service which implements a free threaded COM object. Our testers are running more and more threads against the service but this eventually results in an ugly runtime crash when it starts running out of RAM.

How can I configure ATL (or COM) to limit the number of threads that are created inside the service?

I've been looking at the CComClassFactoryAutoThread. Looks like you enable this with the DECLARE_CLASSFACTORY_AUTO_THREAD macro but I don't know if I can use 开发者_JS百科this with a service. Also how do I limit the thread pool size if I use this?

Thanks,

Tom

0

精彩评论

暂无评论...
验证码 换一张
取 消