ASMX 或 WCF 代理客户端是否使用 IO 完成端口?

发布于 2024-07-13 23:50:38 字数 774 浏览 3 评论 0原文

我正在对项目的一个关键部分进行性能测试,此时我注意到有大量额外的线程用于执行 WaitOrTimerCallback 操作。

替代文本 http:// lh4.ggpht.com/_p7-jVU64mGg/SZuWgUvTD7I/AAAAAAAAAEk/PUFrXrYvZh0/threads_thumb%5B1%5D.jpg?imgmax=800

经过仔细检查,我可以看到这些是由我的 ASMX 客户端代理类生成的用于操作在远程服务器上。

我的印象是这些使用 IO 完成端口,就像我所有其他异步 IO 调用一样。

是否可以让 ASMX 或 WCF 代理客户端使用 IO 完成端口? 如果不是——那还有什么意义呢?

[更新] 该项目使用 ASMX 代理客户端。 看来他们正在使用普通线程池来注册 WaitOrTimerCallback。 我现在正在使用 WCF 代理客户端。 这些不会产生额外的线程,因此我只能假设它们正在使用所需的 IO 完成端口。

ASMX 代理类是使用 Visual Studio 2008 创建的。我已将以下行添加到项目文件中:“WebReference_EnableLegacyEventingModel>true” 由于当前的 ASMX 客户端风格默认情况下未启用异步。

I'm in the middle of performance testing a critical section of my project, when I notice a whole lot of extra threads being used to to perform WaitOrTimerCallback operations.

alt text http://lh4.ggpht.com/_p7-jVU64mGg/SZuWgUvTD7I/AAAAAAAAAEk/PUFrXrYvZh0/threads_thumb%5B1%5D.jpg?imgmax=800

On closer inspection I can see that these are being spawned by my ASMX client proxy class for operations on a remote server.

I was under the impression that these were using IO completion ports like all of my other asynchronous IO Calls.

Is it possible to get a ASMX or WCF proxy client to use IO Completion ports? If not - really what is the point?

[UPDATE]
The project was using ASMX proxy client(s). It appears that they are using the normal thread pool inorder to register a WaitOrTimerCallback. I'm now working with WCF Proxy clients. These are not spawning extra threads so i can only assume they are using the desired IO completion ports.

The ASMX Proxy class was created using Visual Studio 2008. I had added the following line to the the project file: "WebReference_EnableLegacyEventingModel>true" As the current flavour of ASMX clients do not have Asynchronous enabled by default.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尹雨沫 2024-07-20 23:50:38

我不能代表 ASMX,但 WCF 确实可以(并且像您一样,如果 ASMX 不可以,我会感到惊讶)。 您能否获取调用堆栈以确保它们确实在网络调用(而不是其他用户代码)上被阻止?

I can't speak for ASMX, but WCF definitely does (and like you I'd be surprised if ASMX doesn't). Can you get the call stacks to ensure that they really are blocked on network calls (and not some other user code)?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文