开发者

Can I go from managed thread ID to ProcessThreadID

开发者 https://www.devze.com 2023-04-01 12:12 出处:网络
I\'ve been brainstorming ways to measure UI thread utilization, and it looks like I can possibly back my into it by looping through the ProcessThreads for the current process and then trying to figure

I've been brainstorming ways to measure UI thread utilization, and it looks like I can possibly back my into it by looping through the ProcessThreads for the current process and then trying to figure out which one the UI is on.

Is there any structured way to go from a m开发者_如何学编程anaged thread ID to a process thread ID? Generally this is a bad idea because if your managed thread is recycled it could end up on a different process thread, but AFAIK, that can't happen with the UI thread. While the UI is running, that UI managed thread is going to map to the same process thread ID.

0

精彩评论

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

关注公众号