开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜