开发者

Does WebBrowser's DocumentCompleted occurs on the same thread as the one that calls Navigate?

开发者 https://www.devze.com 2023-01-17 08:44 出处:网络
I\'m almost sure it does but I just need to make sure. I don\'t want my app to be executing anothe开发者_JAVA百科r method at the same time DocumentCompleted is being called.No, it is raised on the thr

I'm almost sure it does but I just need to make sure. I don't want my app to be executing anothe开发者_JAVA百科r method at the same time DocumentCompleted is being called.


No, it is raised on the thread that created the WebBrowser, the one that's also pumping the message loop that keeps events on WebBrowser alive. Calling Navigate() from a worker thread is technically possible but unwise if you want to keep your ducks in a row.


Yes it does (at least, according to the following picture from VS2010 debugger);

Does WebBrowser's DocumentCompleted occurs on the same thread as the one that calls Navigate?

0

精彩评论

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

关注公众号